Hi,
I setup a Template Alarm Control Panel using some switches I have setup to control my home alarm.
Config:
alarm_control_panel:
- platform: template
panels:
home_alarm_panel:
value_template: "{{ states('sensor.alarm_status') }}"
arm_away:
service: switch.toggle
data:
entity_id: switch.alarm_arm_away
arm_home:
service: switch.toggle
data:
entity_id: switch.alarm_arm_stay
disarm:
- service: switch.toggle
data:
entity_id: switch.alarm_disarm
I now have this in my lovelace front end using the Lovelace Alarm Panel card.
My questions is, how can I configure a code for the template alarm panel? It seems the Templace alarm panel doesn’t have an option to define one.
Cheers.
ErMejoo
(Matteo)
April 2, 2020, 2:38pm
2
Hi Kanishkaz,
I am not sure if this helps, but why use personalized switches?
Something very simple like:
entity: alarm_control_panel.home_alarm
states:
- arm_home
- arm_away
type: alarm-panel
…would give you a full panel as you’d expect it:
What are your blockers not to use the alarm integration?
Some useful reads:
https://www.home-assistant.io/lovelace/alarm-panel/
https://www.home-assistant.io/integrations/manual/
https://www.home-assistant.io/integrations/alarm_control_panel.template/
Hi @ErMejoo ,
My alarm has a REST API. I have switches configured in Homeassistant that control the Arm/ Disarm functions.
I’m not sure how I can integrate my alarm since it cannot be integrated natively.
There is no way to use a code directly as you would think. I think this is an oversight in implemention. You have to put it in a condition for your action. See my example here:
https://community.home-assistant.io/t/esphome-alarm-system/
THanks @MatthewFlamm . That looks interesting.
How have you configured your alarm in Lovelace? If I don’t want to use the code at all, can I hide the keypad in Lovelace?
1 Like
Just don’t add it to Lovelace or remove the card?
What I meant was, use the Lovelace alarm card without the keypad section. Maintaining the buttons and status icon.
Not sure if you can do this with the alarm card. Sounds like you only need some buttons and some text.
It might not be a bad idea to use a code here anyway if you will ever give access to your home assistant interface to anyone else. It doesn’t need to match your actual alarm system code if you don’t want it to.
AhmadK
(akasma74)
April 2, 2020, 3:49pm
9
you’ll still need the keypad to disarm it, won’t you?
Not necessarily. As @MatthewFlamm mentioned, I can just use some buttons to achieve this as the REST API call does not need a code to control the alarm.
AhmadK
(akasma74)
April 3, 2020, 1:45am
11
No worries then.
I think you can use card-mod
to set display: none
for all unnecessary elements in alarm card, have you tried?
Thanks for the tip. Didn’t know that existed. I’ll check it out.
For anyone who wants to do the same, here’s my Lovelace card with card-mod to hide the Code input and keyboard.
type: alarm-panel
states:
- arm_home
- arm_away
entity: alarm_control_panel.home_alarm_panel
name: Home Alarm
style: |
#keypad, #alarmCode {
display: none !important;
}
7 Likes
armagedon
(Jaoued ZAHRAOUI)
November 28, 2020, 10:22pm
16
hello,
I’m facing the same problem, but, unfortunately the style solution didn’t worked for. it have no effect at all.
don’t know if this is due to the last home assistant version. Help will be appreciated.
The style fix still works for me. I’m on 0.118.
armagedon
(Jaoued ZAHRAOUI)
November 30, 2020, 8:17am
18
Thank you for your reply,
I made a copy paste of the code that you shared, as you can see in the screenshot :
I’m missing something ?
armagedon
(Jaoued ZAHRAOUI)
November 30, 2020, 9:00am
19
ho ok, my bad, I was not using the plugin https://github.com/thomasloven/lovelace-card-mod
this is working now
thank you
1 Like
brano1990
(Brano1990)
February 11, 2021, 1:36pm
20
hi when he is disarmed
I want the keyboard to be hidden
when is armed_home
I want the keyboard to appear
it is possible?