Motion sensor help

I have two motion sensors linked via an rf bridge. The sensors seem to work ok and the toilet light work great and goes on and of at the correct timings. The back door one however does not work. Below is my automation. Anyone shed some light on what the problem may be. Thanks :grinning:

  • alias: Turn on toilet light when there is movement
    trigger:
    platform: state
    entity_id: binary_sensor.toilet_motion
    to: ‘on’
    action:
    service: homeassistant.turn_on
    entity_id:
    - light.tradfri_bulb_2

  • alias: Turn off toilet light 1 minute after last movement
    trigger:
    platform: state
    entity_id:
    - binary_sensor.toilet_motion
    to: ‘off’
    for:
    minutes: 1
    action:
    service: homeassistant.turn_off
    entity_id:
    - light.tradfri_bulb_2

  • alias: Turn on backdoor light when there is movement
    trigger:
    platform: state
    entity_id: binary_sensor.back_door_motion
    to: ‘on’
    action:
    service: homeassistant.turn_on
    entity_id:
    - light.tradfri_bulb

  • alias: Turn off backdoor light 1 minute after last movement
    trigger:
    platform: state
    entity_id:
    - binary_sensor.back_door_motion
    to: ‘off’
    for:
    minutes: 1
    action:
    service: homeassistant.turn_off

Please read the sticky post which includes information on how to correctly format your post.

Sorry I belive this should solve the formating problem. Thanks for the heads up.

- alias: Turn on toilet light when there is movement
  trigger:
    platform: state
    entity_id: binary_sensor.toilet_motion
    to: 'on'
  action:
    service: homeassistant.turn_on
    entity_id:
      - light.tradfri_bulb_2
      
- alias: Turn off toilet light 1 minute after last movement
  trigger:
    platform: state
    entity_id: 
       - binary_sensor.toilet_motion
    to: 'off'
    for:
      minutes: 1
  action:
    service: homeassistant.turn_off
    entity_id:
      - light.tradfri_bulb_2
      
      
      
- alias: Turn on backdoor light when there is movement
  trigger:
    platform: state
    entity_id: binary_sensor.back_door_motion
    to: 'on'
  action:
    service: homeassistant.turn_on
    entity_id:
      - light.tradfri_bulb
      
- alias: Turn off backdoor light 1 minute after last movement
  trigger:
    platform: state
    entity_id: 
       - binary_sensor.back_door_motion
    to: 'off'
    for:
      minutes: 1
  action:
    service: homeassistant.turn_off

Thanks :wink:

If you find the automation in the States menu (under Developer tools - you may need to enable Advanced mode in your user profile first), select the icon next to it, and then push TRIGGER does the problem automation work?

thanks guys/gals solved it, had the wrong protocol set for one of the motion sensors.

Can you please explain in more detail exactly how you solved this, and what you mean by “the wrong protocol” ? What was wrong and how did you correct it?