Issue with automation to turn of light

Great that makes sense. I have added the Remote Control to Zigbee2mqtt, and can see the “toggle” action as soon as i press the power button. How can transform it to my automation ? Will action: toggle be enough?

- id: Turn on bathroom light
  alias: Turn on bathroom light
  trigger:
    - platform: state
      entity_id: sensor.afstandsbediening_badkamer_action
      to: "toggle"
  condition: 
  - condition: and
    conditions:
    - after: sunset
      condition: sun
    - before: '23:30'
      condition: time
    - state: 'off'
      entity_id: light.badkamer
      condition: state 
  action:
    - service: light.turn_on
      data:
        entity_id: light.badkamer
        brightness: 190
        color_temp: 370

The downside is that i have to create automations to use the other buttons on the remote control ? Left Right for the color temperature, and Up and Down for the brightness?

@123, thanks after some testing it worked out the way you told me :slight_smile: Many thanks for your help. Next thing / little project is that i get the brightness up and down buttons working.

1 Like