Figured I’d share the alarm.com setup for those wanting to be able to view their sensor state. I went with the split config approach for my sensors. In my configuration.yaml file I included the below.
binary_sensor: !include binary_sensors.yaml
I put all my binary sensors within a file called “binary_sensors.yaml”. One thing to note that I didn’t see documented or I perhaps wasn’t looking at the right stuff. You denote the sensor type before the !include command line. If you put the sensor type of "binary_sensor: within the binary_sensor.yaml it will fail with an error stating “Invalid config for [binary_sensor]: required key not provided @ data[‘platform’]…”
Below is an example of what I have in place in the binary_sensor.yaml file. You can simply copy a entry and edit to to reflect your sensor name in alarm.com You can change out the device_class with anything from Binary Sensor Class documentation.
- platform: template
sensors:
alarm_frontdoor:
friendly_name: "Front Door"
device_class: door
value_template: >-
{{ state_attr('alarm_control_panel.alarm_com', 'sensor_status')|regex_search('Front Door is Open', ignorecase=TRUE) }}
- platform: template
sensors:
alarm_backdoor:
friendly_name: "Back Door"
device_class: door
value_template: >-
{{ state_attr('alarm_control_panel.alarm_com', 'sensor_status')|regex_search('Back Door is Open', ignorecase=TRUE) }}
- platform: template
sensors:
alarm_smokedetector:
friendly_name: "Smoke Detector"
device_class: smoke
value_template: >-
{{ state_attr('alarm_control_panel.alarm_com', 'sensor_status')|regex_search("Smoke Detector is OK", ignorecase=TRUE) }}
Now go to your overview within HA, add an entity card, and select binary sensor/s you created.
Giving credit where its due as this was based off @FlyGuy62N post here. but wanted something a little more simpler and easier to setup for those just starting out with HA like I am.
Edit: I’m aware of the typo, just to didn’t want to mess with uploading a corrected screenshot after the fact.