YET another take on an alarm system


Is anyone else unable to arm/disarm in lovelace? Service gets called, but nothing happens.

Automations work as intended, and I am able to arm/disarm from the states ui. Noticed the change after upgrading to 0.85.


Just upgraded to 0.86.1, and the log is full of this:

2019-01-24 16:25:19 ERROR (MainThread) [frontend.js.es5.201811211] Uncaught TypeError: Cannot read property ‘state’ of undefined

The culprit is this code:

// Close the sidebar if alarm is set and the option is enabled
if (instance) if (instance.alarm.state != ‘disarmed’)‘hass-close-menu’);

Ended up commenting the body of the function (as it will only affect hiding that sidebar).
Could anyone check if they see the same?

p.s I hoped that the developers will fix __ issue and let us have something like input_text.pir__code… but apparently they forbid it, and now print a suggestion like
“Consider changing it to input_text.pir_code”. You can still have __ in automation names unless you want to turn them on/off, but you can’t name your python_script init__whatever…
Oh, well…


I did a pull request with the following on github. My keypad is back on lovelace after restart/cache clear running 0.86.

Line 688

    def code_format(self):
        """One or more characters."""
        if self._code is None:
            return None
        if isinstance(self._code, str) and'^\\d+$', self._code):
            return alarm.FORMAT_NUMBER
        return alarm.FORMAT_TEXT

instead of:

    def code_format(self):
        """One or more characters."""
        return None if self._code is None else '.+'


I tried your suggestion, but it looks like it doesnt work:

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/", line 239, in _step
    result = coro.send(None)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/", line 352, in _async_add_entity
    await entity.async_update_ha_state()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/", line 239, in async_update_ha_state
    attr = self.state_attributes or {}
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/alarm_control_panel/", line 163, in state_attributes
    ATTR_CODE_FORMAT: self.code_format,
  File "/home/homeassistant/.homeassistant/custom_components/alarm_control_panel/", line 694, in code_format
    return alarm.FORMAT_NUMBER
AttributeError: module 'homeassistant.components.alarm_control_panel' has no attribute 'FORMAT_NUMBER'


I should have clarified that it is a fix for 0.86. I had also changed the ruamel.yaml requirement suggested by @aidbish in post #1441 as well.


Anyone else missing the keypad after the 0.86.2 update + an error when opening the Alarm menu: Could not connect to the service: alarm_control_panel\ALARM_YAML_USER ?


Changes done to get things working:

And @aidbish line 22:

REQUIREMENTS = ['ruamel.yaml==0.15.42']


REQUIREMENTS = ['ruamel.yaml>=0.15.42']

Thanks guys!

Though my password box is still filled with random ********* chars, any idea?


Absolutely brilliant!

Nice with some skilled people in here! Thank you!


I ordered a Kerui outdoor solar panel, it should be controllable by a 433mhz signal, for which you can use Broadlink RM or Sonoff RF bridge


I use a z-wave siren, but if you can find an RF one that you can send MQTT commands to there is no reason I can think of why it won’t work.


Hey, you should check out my post on how I got a Kerui siren working with HA.


I think that’s my problem, knowing whether the siren accepts RF codes to turn on and off. Seeing as it’s wireless, I suppose it must do.


Just another note on my z-wave siren, it does have a battery backup built in. I plan to run my HA server on a UPS so getting the siren to trigger during a power outage is no issue. I just haven’t purchased the UPS yet.


I did not receive the 433MHz siren, but I understood that you turn it ON with a 433Mhz signal. I plan to use my existing sonoff RF bridge to do that


Sorry, but it has nothing to do with this alarm system, it is?
Could you discuss the details in the appropriate topic? This one is way too long anyway


Good day,
I am new to home assistant. Can someone assist me in configuring manual alarm panel?
I am trying to use a door sensor to trigger alarm when it is armed away or armed home but it is not working. This is what I have:

the alarm panel is:

  - platform: manual
name: Home Alarm
code: ------
pending_time: 30
delay_time: 20
trigger_time: 4
  trigger_time: 0
  pending_time: 0
  delay_time: 0
  pending_time: 30
  delay_time: 60
  pending_time: 0

# binary_sensor for Main Front Door
    - platform: mqtt
      state_topic: "/tele/sonoff-rf/RESULT"
      name: 'Main_Entrance'
      value_template: '{{value_json.RfReceived.Data}}'
      payload_on: '2E9F0A'
      payload_off: '2E9F0E'
      device_class: door
      optimistic: false
      qos: 1
      retain: false 


 - alias: Trigger alarm while armed home or away
              - platform: state
                entity_id: binary_sensor.main_entrance
                to: 'on'    
              condition: or
              - condition: state
                entity_id: alarm_control_panel.alarm
                state: armed_away
              - condition: state
                entity_id: alarm_control_panel.alarm
                state: armed_home
              service: alarm_control_panel.alarm_trigger
              entity_id: alarm_control_panel.alarm

          - alias: Alarm Triggered
              - platform: state
                entity_id: alarm_control_panel.alarm
                to: 'triggered'
              - service: notify.notify
                  message: "!Alarm Triggered!"

Any help will be greatly appreciated. Thanks.


You could install the custom alarm panel that this topic is about.


I tried but I do not know how to do it. Instructions not clear to me. Im a newbie


What exactly is not clear?


Okay let me tell you what I tired. I copied thefollowing into configuration.yaml:

alarm_control_panel: !include alarm.yaml
panel_custom: !include panel_custom.yaml

Then created alarm.yaml and paste the raw code of alarm.yaml into the newly created alarm.yaml. I also copied the raw code of automation.yaml into my newly created automation.yaml. Then created panel_custom.yaml and copied the raw code into my newly created panel_custom.yaml. Then I saved into config/ directory. Nothing works. I got an invalid config messgae saying:

Configuration invalidCHECK CONFIG

Platform not found: alarm_control_panel.bwalarm