Only binary sensors are supported.
but it supported custom states in the old version, do you think it’s definitely gone now?
Awesome alarm system! I have just one problem with it. I have an automation that turns the alarm off when I arrive home, but I keep getting an error of Invalid code. It still disarms the system, I have tried the code in the ui and it works fine.
- alias: Disarm the house when blah arrives home trigger: platform: state entity_id: binary_sensor.blah_bayesian from: "off" to: "on" action: - service: alarm_control_panel.alarm_disarm entity_id: alarm_control_panel.house data: code: 1234
DEBUG (SyncWorker_27) [custom_components.alarm_control_panel.bwalarm] [ALARM] Invalid code given 1234
DEBUG (SyncWorker_27) [custom_components.alarm_control_panel.bwalarm] [ALARM] Alarm changing from armed_away to disarmed
Can anyone see what I am doing wrong?
Do you mean that it disarms the alarm either way, but you get that
Invalid code given only when your automation triggers? And the code is actually right?
By the way, what version of alarm are you using? I cannot reproduce it on (see custom_components/alarm_control_panel/bwalarm.py)
I made a script with sequence as your action, and it works as expected - wrong code is reported, on right code it disarms.
Are you having log level of your alarm set as debug? It’s not by default…
From the alarm code I presume that not only binary sensors are allowed.
Have look at these attributes (case-insensitive) and try to change your code if necessary:
because of the alarm.html:
return ‘disarmed the alarm’;
return ‘Disarm attempt failed, wrong code!’;
return 'The alarm has been triggered! Sensor: ';
return ‘set the alarm in Home mode’;
return ‘set the alarm in Away mode’;
return 'Alarm has been tripped! Sensor: ’ ;
return ‘Panel Locked’;
return ‘set the alarm in Perimeter mode’;
The easiest way to get the sensors’ names is to add
+ entry after those strings ending with
Sensor: like this
return 'Alarm has been tripped! Sensor: ' + entry;
and don’t forget to clear cache/reload page in your browser.
That used to work (plain sensors with custom statuses) with version 1.0.2 and panel v1.1.2
Installing the latest github version with HA 0.86.4 broke it (or at least didn’t work with the new front-end configurator)
Anyway, I’ll read past messages to try to see what can I do.
What are the recommended versions of this component?
Basically you need to backup your alarm.yaml, copy a new (almost empty) one from github alongside everything else, run configurator, exit and change alarm.yaml manually (it’s obvious when you look inside).
The latest version of this component (with some tweaks) works fine with my Hass.io 0.86.1
Thank you, I’ll give another try during the weekend
Thanks for the response @AhmadK . Sorry if I wasn’t clear.
So its nothing to do with the automation. Trying a few more things before I replied to you I have discovered that it works fine for user 1 and gives this error on user 2… it still disarms the alarm system just gives an error. I have deleted the user and recreated it but its still the same.
With user 2 it even gives the error in the alarm control panel… but again still disarms it
Any chance to see your config to reproduce?
Currently I can see little point in different users apart from having per-user codes (what for?).
So I know who has disarmed the system.
Sure what config do you want to see? alarm.yaml?
How user 1 and user 2 disarm the alarm?
They will eventually disarm it by a Bayesian presence detection but this is giving the error with just entering it via the ui keypad
ok, so the automation does work, but their per-user codes don’t when they enter it via UI?
If yes, do the codes in automation match per-user codes?
It would be great to see automation(s) and alarm.yaml
The codes always work its just the 2nd user ones gives that error in the logs but still unlocks the alarm.
I have to dash right now will post the automations and alarm.yaml in an hr or so
Thank you so much for your help, that worked a treat.
Just be picky, is there a way for it to display the Friendly Name rather than the Entity ID? Absolutely no worries if it’s not possible.
yes, there is a way as you can see on the screenshot above.
however, it requires plenty of small changes to bwalarm.py as well.
perhaps I’ll make a PR later.