Switch not working in automation

automation
Tags: #<Tag:0x00007f1ba2fe3c00>

#1

Hello,

I got an automation, but a simple rtf-switch is working on the front-end but not in the automation.
Probebly something simpel, but just can’t find the problem.
The second part, the Danfoss z-wave does work. so the problem shout really be somewhere in the automation of the switch.

This is my automation file

- id: 'cv_pomp_uitschakelen'
  alias: CV-pomp uitschakelen
  trigger:
  - at: '8:30'
    platform: time
  condition: []
  action:
    - data:
        entity_id: switch.d2
        service: switch.turn_off
  action:
  - service: climate.set_operation_mode
    data:
      entity_id:  climate.danfoss_z_thermostat_heating_1
      operation_mode: Heat
  - service: climate.set_temperature
    data:
      entity_id:  climate.danfoss_z_thermostat_heating_1
      temperature: 16

I know that a don’t use the seconds in the trigger, but that I to be sure the rtf-switch gets the signal. (treid with the seconds, but no difference).


#2

Maybe you have to use ‘08:30’ instead of ‘8:30’ - I think I’ve previously seen discussions about this.

But I use this format a lot and it works very reliably:

  trigger:
    platform: time
    hours: 07
    minutes: 01
    seconds: 00


#3

The problem is not in the time.
The Danfloss part workshop on iT
Tanx anyway


#4

Just saw it now, you have two ‘action’ sections and the spacing seems to be off.

- id: 'cv_pomp_uitschakelen'
  alias: CV-pomp uitschakelen
  trigger:
    platform: time
    at: '8:30'
  condition: []
  action:
    - service: switch.turn_off
      entity_id: switch.d2
    - service: climate.set_operation_mode
      data:
        entity_id:  climate.danfoss_z_thermostat_heating_1
        operation_mode: Heat
    - service: climate.set_temperature
      data:
        entity_id:  climate.danfoss_z_thermostat_heating_1
        temperature: 16

#5

Thanx, already was thinking it had to do something with the spacing, but could not put my finger on it.
Now it works !


#6

Good to hear - glad I could help.