Basic light automation - can't get it to work

Hi,

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.

For automation I copy & pasted the example here: https://www.home-assistant.io/cookbook/turn_on_light_for_10_minutes_when_motion_detected/ into the previous empty automations.yaml. Then I changed the code so it reflex the sensor and bulb I have, so now it looks like this:

 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?

Cheers,

Check what state your multisensor 6 goes into when it checks motion using the Developer Tool > States page.

I have one of these sensors and when it detects motion the burglar sensor changes to 8. So I use the following trigger on my automation:

    trigger:
      platform: numeric_state
      entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
      above: 7

I don’t know if that helps.

1 Like

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.

2 Likes

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.

I found the solution, remove “automation:” (the first line).

But I would have struggled with everything else first if I haven’t gotten your help! Thank you so much!

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.

1 Like

Well spotted. I was (along with everyone else on the thread) looking for something in the automation rather than the entities used :rofl: wood for trees

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:

image

Does that create a binary sensor entity?

If you configure the aeotec multisensor like this, it will create a binary sensor automatically.

My motion sensors (not aeotec) do not have this option so it is not something I was aware of…

Don’t know about other devices, just using the aeotec ones here.

I have a mixture of fibaro, aeotec and cool cam not sure which support what as I haven’t actually installed any of them yet :rofl: