ESPHome

ESPHome: Customize Zone Inputs on Konnected Alarm Panels

How to change zone types and settings in ESPHome and use different types of sensors and outputs

By default, Konnected's ESPHome builds set up each zone on the Konnected Alarm Panel as a basic binary input. Binary means that it has two states: open/closed or detected/not-detected. 

This article will show you how to customize the zones for different use cases.

Binary Sensor Inputs

Konnected's ESPHome builds define entity IDs named zone1 thru zone6 on the 6-zone boards and zone12 on the Alarm Panel Pro.

Konnected's default binary sensor configuration sets up a basic input zone that can has limited customization in Home Assistant (name, device class, and icon). For more advanced customizations, you can use the !extend keyword to extend functionality.

Changing the Name and/or type of a Zone

You can rename zones and set the device class in the Home Assistant UI, or extend the zone configuration and override the name and device_class so that your zone configuration is saved in the firmware. This example renames Zone 3 to "Upstairs Windows" and sets Zone 4 as a motion sensor called "Downstairs":

binary_sensor:

- id: !extend zone3
name: Upstairs Windows
device_class: window

- id: !extend zone4
name: Downstairs
device_class: motion

Inverting a Sensor

You may need to invert a sensor if the states are reversed, for example a smoke detector that is normally open, by extending the config and setting inverted to true like this:

 binary_sensor:
- id: !extend zone3
name: Smoke Alarm
device_class: smoke
pin:
inverted: true

Prevent "Flickering" State Changes or Debouncing

Sometimes a contact sensor will open and close a few times very fast when moving, so to prevent many rapid state changes we use a debouncing filter. By default this is set to 200 milliseconds. You can adjust it globally:

substitutions:
sensor_debounce_time: 500ms

Or individually overriding a specific input zone:

binary_sensor:
- id: !extend zone1
filters:
- delayed_on_off: 500ms