I havenât read the whole thread here, but the automations in your latest post donât make any sense.
Youâre triggering on 2 different times, but then immediately conditioning out one of the triggers in the first step of the action.
Youâre also using a âchooseâ but thereâs only one set of actions.
I can see that above your post youâve had Taras helping you out and Iâm not scrolling up any further because Iâm 100% certain that he hasnât suggested you structuring your automations like that.
Please review the documentation on how to structure an automation before going any further.
Check Configuration > Automations and ensure the two automations are turned on.
You should know that what you posted above is, once again, not the same as the example I had suggested. Itâs missing the entire section containing default.
Taras
Thank you for all your help and attention.
is there any chance that you can help me with this one
This is what i got now and i would like the same to work from 19:00 to 0:00
When the automation is triggered at 06:00, or 19:00, it will repeatedly turn_on/turn_off the towel warmer until 09:00 (if it was triggered at 06:00) or 00:00 (if it was triggered at 19:00).
When the automation is triggered at 09:00, or 00:00, it will turn_off the towel warmer.
Thanks for your help
i added it exactly as you written it and it does not show in my automations
I reloaded automations but it did not changed anything
- id: '1605522529347'
alias: Front door open too long
description: ''
trigger:
- platform: state
entity_id: binary_sensor.front_door_contact_sensor
to: 'on'
for: '120'
condition:
- condition: state
entity_id: binary_sensor.ground_entry_motion_sensor
state: 'off'
action:
- type: turn_on
device_id: 5633174037c6788d22447da0a5ebab2b
entity_id: light.entrance_light_level_16
domain: light
brightness_pct: 100
- type: turn_on
device_id: 9117d5e1aa403dac392e5ececeb9a6bd
entity_id: switch.ground_floor_stairs_switch_68
domain: switch
- type: turn_on
device_id: 63ce054727c77b21c2f192b3cb2f95be
entity_id: switch.reception_stairs_switch_72
domain: switch
- type: turn_on
device_id: 2479ad6ef6c78741460efbc6e09f04fd
entity_id: switch.1st_floor_stairs_switch_60
domain: switch
mode: single
- id: '1605736195823'
alias: 'Wc lights on '
description: ''
trigger:
- platform: state
entity_id: binary_sensor.ground_toilet_motion_sensor
to: 'on'
from: 'off'
condition:
- condition: device
type: is_off
device_id: adb946916530fb987e90ed1a3fd6226b
entity_id: switch.ground_floor_toilet_light_switch_69
domain: switch
action:
- type: turn_on
device_id: 7298b583049cdb83486d352164ea31d0
entity_id: switch.ground_floor_toilet_mirror_switch_70
domain: switch
mode: single
- id: '1605736380964'
alias: WC Lights off
description: ''
trigger:
- platform: state
entity_id: binary_sensor.ground_toilet_motion_sensor
from: 'on'
to: 'off'
for: '90'
condition: []
action:
- type: turn_off
device_id: adb946916530fb987e90ed1a3fd6226b
entity_id: switch.ground_floor_toilet_light_switch_69
domain: switch
- type: turn_off
device_id: 7298b583049cdb83486d352164ea31d0
entity_id: switch.ground_floor_toilet_mirror_switch_70
domain: switch
mode: single
- id: '1605953015846'
alias: Utility room lights on
description: ''
trigger:
- platform: state
entity_id: binary_sensor.utility_pir_motion_sensor
from: 'off'
to: 'on'
condition:
- condition: device
type: is_off
device_id: 3917cc9c69a9818125b086a9837cd9ce
entity_id: switch.utility_room_light_switch_43
domain: switch
action:
- type: turn_on
device_id: 3917cc9c69a9818125b086a9837cd9ce
entity_id: switch.utility_room_light_switch_43
domain: switch
mode: single
- id: '1605953154001'
alias: Utility room lights off
description: ''
trigger:
- platform: state
entity_id: binary_sensor.utility_pir_motion_sensor
from: 'on'
to: 'off'
for: '180'
condition: []
action:
- type: turn_off
device_id: 3917cc9c69a9818125b086a9837cd9ce
entity_id: switch.utility_room_light_switch_43
domain: switch
mode: single
- id: '1605953388019'
alias: Lift on
description: ''
trigger:
- platform: time
at: '6:00'
condition: []
action:
- type: turn_on
device_id: 16e2c5581de736a64362eb8359c51c99
entity_id: switch.lift_switch_81
domain: switch
mode: single
- id: '1605953509626'
alias: Lift off
description: ''
trigger:
- platform: time
at: '23:30'
condition: []
action:
- type: turn_off
device_id: 16e2c5581de736a64362eb8359c51c99
entity_id: switch.lift_switch_81
domain: switch
mode: single
- id: '1605956999110'
alias: Patio lights on
description: ''
trigger:
- platform: state
entity_id: binary_sensor.kitchen_patio
from: 'off'
to: 'on'
condition:
- condition: sun
before: sunrise
after: sunset
- condition: device
type: is_off
device_id: 4775957bfffb85610aa6ae1812162970
entity_id: switch.patio_entrance_light_switch_75
domain: switch
- condition: device
type: is_off
device_id: 21a98da426583c28d788872757f9250a
entity_id: switch.patio_entrance_step_switch_76
domain: switch
- condition: device
type: is_off
device_id: 52cf69a90b6d4165ddd351884af92dd5
entity_id: switch.patio_wall_left_switch_73
domain: switch
- condition: device
type: is_off
device_id: fbd8c54af7b892db6d73643d1c16e6bd
entity_id: switch.patio_wall_right_switch_74
domain: switch
action:
- type: turn_on
device_id: 4775957bfffb85610aa6ae1812162970
entity_id: switch.patio_entrance_light_switch_75
domain: switch
- type: turn_on
device_id: 21a98da426583c28d788872757f9250a
entity_id: switch.patio_entrance_step_switch_76
domain: switch
mode: single
- id: '1605957232648'
alias: Patio lights off
description: ''
trigger:
- platform: state
entity_id: binary_sensor.kitchen_patio
from: 'on'
to: 'off'
for: '6000'
- platform: state
entity_id: binary_sensor.kitchen_rear_motion_sensor
from: 'on'
to: 'off'
for: '3000'
condition: []
action:
- type: turn_off
device_id: 4775957bfffb85610aa6ae1812162970
entity_id: switch.patio_entrance_light_switch_75
domain: switch
- type: turn_off
device_id: 21a98da426583c28d788872757f9250a
entity_id: switch.patio_entrance_step_switch_76
domain: switch
- type: turn_off
device_id: 52cf69a90b6d4165ddd351884af92dd5
entity_id: switch.patio_wall_left_switch_73
domain: switch
- type: turn_off
device_id: fbd8c54af7b892db6d73643d1c16e6bd
entity_id: switch.patio_wall_right_switch_74
domain: switch
mode: single
- id: '1605987924934'
alias: Entry in the dark
description: Front door opened when dark and no motion
trigger:
- platform: state
entity_id: binary_sensor.front_door_contact_sensor
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: binary_sensor.ground_entry_motion_sensor
state: 'off'
action:
- type: turn_on
device_id: 5633174037c6788d22447da0a5ebab2b
entity_id: light.entrance_light_level_16
domain: light
brightness_pct: 33
- type: turn_on
device_id: 9117d5e1aa403dac392e5ececeb9a6bd
entity_id: switch.ground_floor_stairs_switch_68
domain: switch
- type: turn_on
device_id: 63ce054727c77b21c2f192b3cb2f95be
entity_id: switch.reception_stairs_switch_72
domain: switch
mode: single
- id: '1606244255024'
alias: Patio lights on when Dinner
description: ''
trigger:
- platform: state
entity_id: binary_sensor.kitchen_rear_motion_sensor
from: of
to: 'on'
condition:
- condition: sun
before: sunrise
after: sunset
action:
- type: turn_off
device_id: 52cf69a90b6d4165ddd351884af92dd5
entity_id: switch.patio_wall_left_switch_73
domain: switch
mode: single
- id: '1606769630999'
alias: Towel_warmer_morning_and_evening
description: ''
trigger:
- platform: time
at:
- 06:00:00
- 09:00:00
- 19:00:00
- 00:00:00
action:
- choose:
- conditions: '{{ trigger.now.hour == 6 or trigger.now.hour == 19 }}'
sequence:
- repeat:
while: '{{ 6 <= now().hour < 9 or 19 <= now().hour <= 23 }}'
sequence:
- service: switch.turn_on
entity_id: switch.towel_warmer_switch_83
- delay: 00:15:00
- service: switch.turn_on
entity_id: switch.towel_warmer_switch_83
- delay: 00:10:00
default:
- service: switch.turn_off
entity_id: switch.towel_warmer_switch_83
I have created a slightly different version of the automation for myself so that I can test it on my system. It will help me understand why it isnât working correctly for you.
While I was creating it, I noticed a mistake. During our discussion, I copy-pasted a few lines without examining them closely. Unfortunately, I copied a mistake.
In my original example, I has suggested the following. Notice how it first calls the turn_on service and then the turn_off service :
Later, I blindly copied what you had posted here and have been using it ever since. Unfortunately, it contains a mistake. The second service call is turn_on but it should be turn_off
Please change the second service call to switch.turn_off to make it match my original example.
I believe the automation still should have turned off the switch at 09:00 and 00:00 because thatâs what the default section is designed to do. I will be testing it on my system to understand why it failed to do that.
Iâm still running my tests. So far it has successfully completed its first cycle. It triggered at the correct start time, correctly toggled an input_boolean (instead of a switch), then turned off the input_boolean at the correct end time. I am now waiting for it to start its second cycle which I have programmed to run longer. I will have results later this evening (at 18:00 EST). However, so far, the first cycle worked correctly.
If youâre interested, this is the automation I am testing:
Final results of my test demonstrate that the automation works exactly as designed.
It turned on the input_boolean at 15:30 and 17:00 and turned off the input_boolean at 16:00 and 18:00. During the two periods, the input_boolean was turned on for 15 minutes and then turned off for 10 minutes, repeating this pattern until the period ended.
This is precisely the behavior you want. If your instance of the automation is not turning off the heater at the specified times then it is different in some subtle but significant way. All I can say is you should review it, line by line, and ensure it matches what I originally posted. For example, if it is missing the default section, it will definitely fail to turn off the heater.