Automation switch issue

Hello all,
I am trying to integrate my vaillant heater with simple ewelink relay.
I added a button to manually switch the relay and it is working.

i make such a simple automation script

- alias: Manual Mode Heater Control
  trigger:
  - platform: state
    entity_id: input_select.auto_manual_mode
    from: 'Auto'
    to: 'Manual'
  action:
  - service: switch.turn_off
    target:
      entity_id: switch.heater_relay
  mode: restart 
  id: manual_mode_heater_control

when i call this switch heater relay part from developers menu it switches the relay on and off as expected but when in automations
from trace i can see logic is correct and it selects to turn on (or off) the relay but switch doesnt do anything.

what am i missing here?

I found the problem…
on automation the switch name doesnt count…
i need to write the real id of he entity as switch.sonoff_100xxxxxx

1 Like