It is my first post here, I’m a new user of Home Assistant, so I apologize in advance for not being very good at Home Assistant yet. I’ve used other HA systems before, though. Now I’m trying to use Home Assistant as it might replace my other system if things work out good. I’ve set up Home Assistant and want to try my first basic automation, but sadly, I can’t get it to work (ashamed).
I have one Aeon Labs Multisensor 6, and one Aeon Labs ZW098 LED Bulb. Both are added to, and found in Home Assistant. I can manually switch on and off the bulb via a Lovelace card. And I can see, for instance, the temp of the multisensor there.
automation:
- alias: Turn on kitchen light when there is movement
trigger:
platform: state
entity_id: binary_sensor.aeon_labs_zw100_multisensor_6_sensor
to: 'on'
action:
service: light.turn_on
entity_id: zwave.aeon_labs_zw098_led_bulb
- alias: Turn off kitchen light 10 minutes after last movement
trigger:
platform: state
entity_id: binary_sensor.aeon_labs_zw100_multisensor_6_sensor
to: 'off'
for:
minutes: 1
action:
service: light.turn_off
entity_id: zwave.aeon_labs_zw098_led_bulb
But… Nothing happens at all… Please, can someone help me?
Your zwave entity does not have the ability to turn on/off it should have created a light.entity which would be the entity ID for your automation. Go to the z-wave configuration page, select the node… then click entities of this node.
Thank you everyone for helping! I’ve now changed the code to:
automation:
- alias: Turn on kitchen light when there is movement
trigger:
platform: numeric_state
entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
above: 7
action:
service: light.turn_on
entity_id: light.aeon_labs_zw098_led_bulb_level
- alias: Turn off kitchen light 10 minutes after last movement
trigger:
platform: numeric_state
entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
below: 1
for:
minutes: 1
action:
service: light.turn_off
entity_id: light.aeon_labs_zw098_led_bulb_level
But it still not works. I see the burglar change to 8 at motion then 0. I hade the light entity wrong, but changed it. I also had the intendation wrong, but changed it.
Is there no binary_sensor created for the aeotec multisensor? If not, you should change the settings of the Aeotec to report binary state for motion. Afterwards you should have a binary_sensor that shows ‘on’ for motion and ‘off’ for no motion.
Yes you could create a binary sensor template and set the device class to motion… I had to do that for one z-wave motion sensor I have. It’s nice then it had the proper icon, will say Detected and Clear… it’s worth it
No you don’t need to create a template binary sensor, if the device is configured correctly, it exposes the binary sensor in addition to the sensor he already has. Option 5 needs to be set to binary sensor report, below is an example from my config: