@gazoscalvertos thanks i get the following error when added !
2017-12-04 14:04:43 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: invalid template (TemplateSyntaxError: unexpected char ‘!’ at 6) for dictionary value @ data[‘action’][0][‘data_template’][‘data’]. Got None invalid template (TemplateSyntaxError: unexpected char ‘!’ at 6) for dictionary value @ data[‘action’][0][‘service_template’]. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 27). Please check the docs at https://home-assistant.io/components/automation/
What it seems to not like the disarm code, i get the following error
2017-12-04 15:31:00 ERROR (MainThread) [homeassistant.core] Invalid service data for alarm_control_panel.alarm_disarm: extra keys not allowed @ data[‘data’]. Got ‘code: 9999’
yes. I have mine setup to fire off a z-wave siren as well as set all of my Yeelight wifi bulbs on and to the ‘Police’ mode (flashing red and blue). It works really well.
I have re-organised your code and tested with the snippet below which works. You were using both data and data_template, only one should be used see here https://home-assistant.io/docs/automation/templating/. If using data_template you need to pass a variable whereas your if statement doesn’t always pass one. The if statement isn’t actually required as the module will take the code even on alarming, it will just ignore it.
Also you might want to change your alarm code or delete your post with the error in as it shows your code.
Oh, Cleared cache loads and no errors in log Grafana works in the panel as does my router (sort of- it won’t let you log in but it appears), also floorplan and my remotes)
platform: bwalarm
name: house
code: !secret alarm_code
pending_time: 25 #Grace time in seconds to allow for exit and entry using Away mode
trigger_time: 600
alarm: automation.alarm_triggered
warning: automation.alarm_warning
clock: True #Optional - True enables a clock in the center of the status bar
perimeter_mode: True #Optional - True enables perimeter mode, this could be known as 'Day Mode' i.e. only arm the doors whilst there is someone using all floors
weather: True #Optional - Allows a weather summary to be displayed on the status bar. Dark Sky weather component must be enabled with the name sensor.dark_sky_summary
#### COLOURS ########### Use any HTML format
warning_colour: 'orange'
pending_colour: 'orange'
disarmed_colour: '#03A9F4'
armed_home_colour: 'black'
armed_away_colour: 'black'
triggered_colour: 'red'
############# SENSOR GROUPS ########################
# Sensors in this group tigger the alarm immediately
immediate:
- binary_sensor.motion_sensor_158d000125a67b
- binary_sensor.door_window_sensor_158d0001d62fb6
- binary_sensor.door_window_sensor_158d0001d68370
- binary_sensor.motion_sensor_158d00015e8e04
- binary_sensor.motion_sensor_158d000125a67b
- binary_sensor.door_window_sensor_158d00016c7797
- binary_sensor.door_window_sensor_158d00016c7804
- binary_sensor.door_window_sensor_158d0001a810a7
- binary_sensor.motion_sensor_158d00015e8e04
# Sensors in this group start the clock (pending_time) when tripped before the alarm is activated in 'Away' mode
delayed:
- binary_sensor.motion_sensor_158d000125a67b
# Same as notathome but hopefully the title is more self explanatory. Can still use notathome for backwards compatibility
# Note sensors can exist in more than one group notice top_floor appears in two groups
homemodeignore:
- binary_sensor.motion_sensor_158d000125a67b
# Use this group to automatically override the warning message on open sensors when setting 'away' mode. (I use this as I have a motion sensor at the front door)
override:
- binary_sensor.motion_sensor_158d000125a67b
panel_custom.yaml
- name: alarm
sidebar_title: Alarm
sidebar_icon: mdi:security-home
config:
alarmid: alarm_control_panel.house ## USE THE SAME ID AS USED IN YOUR ALARM.YAML
The automations are in my automation.yaml file and I’ve checked all the actions, they all seem to be fine.
bwalarm.py is in custom_components/alarm_control_panel
I think I know what’s up, last weekend I commented out the load alarm.yaml after a frustrating day trying to get it to work, so my apologies. Hopefully now it will spring into life
I have just noticed an issue that was probably there the entire time but since I was using my phone (small screen) rather than a computer (full screen) I hadnt noticed until now. In ‘armed away mode’ I have two sensors that are showing as ‘inactive’ when one of them should be part of the immediate trigger and one part of the delayed. What is going on here??
alarm.yaml
platform: bwalarm
name: House
code: !secret alarm_code
pending_time: 25 #Grace time in seconds to allow for exit and entry using Away mode
trigger_time: 600
alarm: automation.alarm_triggered
warning: automation.alarm_warning
clock: True
#### COLOURS ########### Use any HTML format
warning_colour: 'orange'
pending_colour: 'orange'
disarmed_colour: '#03A9F4'
armed_home_colour: 'black'
armed_away_colour: 'black'
triggered_colour: 'red'
############# SENSOR GROUPS ########################
# Sensors in this group tigger the alarm immediately
immediate:
- binary_sensor.kitchen_multi_sensor_sensor
- binary_sensor.lounge_multisensor_sensor
- binary_sensor.master_bedroom_multisensor_sensor
# Sensors in this group start the clock (pending_time) when tripped before the alarm is activated in 'Away' mode
delayed:
- binary_sensor.passage_multi_sensor_sensor
# Same as notathome but hopefully the title is more self explanatory. Can still use notathome for backwards compatibility
# Note sensors can exist in more than one group notice top_floor appears in two groups
homemodeignore:
- binary_sensor.passage_multi_sensor_sensor
- binary_sensor.master_bedroom_multisensor_sensor
# - binary_sensor.kitchen_multi_sensor_sensor
# Use this group to automatically override the warning message on open sensors when setting 'away' mode. (I use this as I have a motion sensor at the front door)
#override:
- binary_sensor.passage_multi_sensor_sensor
and here is a screenshot showing the sensors in the wrong groups…
I’m confused. Its as if the sensors in ‘home mode ignore’ are being ignored in away mode…(for the record, home mode has the sensors in the correct groups)