How do I create a flexible sleep timer?

I really can’t see what in that could turn the AC back on, which makes me think it must be something with your AC integration, or that you have multiple AC. Are you controlling the AC through an IR blaster or something?

Maybe try disabling two of your AC units and doing all testing with just one unit, to isolate some interaction between them?

For now I’ve only looked at this on mobile. My work above has worked fine for me without any intervention for over a year so I’d need to sit down and get familiar with it again. We are in the lovely mild period of year where we don’t need to heat or cool, so I’ve got no recent traces to refer to.

no alex, i control my climate entities trough toshiba integration in HA via wifi so i doubt it can be an interference between the 3 AC(static ip for each!)
when i’ve tested the automation the powered on Ac was just one.

here in south italy we have too a lovely temperature in this period, but i’m working to automate my AC for the hot summer that will come!

1 Like

That’s curious. There must be a simple explanation but I can’t see the cause in what you’ve provided above.

Next suggestion, disable the scripts and automation for now and make a very simple automation that turns off the AC when the timer finishes. Manually reset, start and end the timer from the developer > states page to trigger the automation and see if it still turns back on.

edit: i’ve tryed your suggestion, and it works! (started a configured 1 min timer via developer option. the timer finish event trigger this test automation(created via UI and not in yaml):

alias: test_ac_off_automation
description: ""
trigger:
  - platform: event
    event_type: timer.finished
    event_data:
      entity_id: timer.test_timer_ac
condition: []
action:
  - service: climate.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: climate.haori_letto
mode: single

The powered on AC power off correctly and doesn’t revert on!
So i assume the problem in some conditions of automation! or script


original post:

thanks alex, i give it a try!
yesterday i’ve done a simle test in the automation, changing the service invoked by the event timer.finished from

action:
  - service: climate.turn_off
    data: {}
    target:
      entity_id: climate.haori_letto # your AC entity here
mode: single

to

action:
  - service: climate.set_hvac_mode
    target:
      entity_id:
        - climate.haori_letto
    data:
      hvac_mode: "off"
mode: single

both service power off correctly the AC if launched in developer option, but non by the automation.
In logbook i can see that each power off and successive power on are activated by the event timer.finished in air off automation!

Btw i’ll try to make a simple auotmation for power off with no condition after timer finishes, starting and stopping the timer via developer as you suggested!

Sorry for the slow reply - didn’t see your update. Have you made any other breakthroughs?

Great that you’ve been able to confirm that a simple timer and automation can turn off the AC and it stays off. That means it has to be something specific to your other timer and automation set up. Do you have any other automation or triggers related to that timer entity? I think you just need to step through each part of the automation one by one to isolate where this behaviour is coming from. You could try disabling the increment script, and testing the main timer when it ends, to isolate the script from the issue.

I know it’s not a great help, I’m not able to see the cause from my end though, so all we can do is search!

hi @alexeiw123 ,
i’ve done some other test! i’f i turn on the climate via lovelace climate card, and after 30 mins i call climate.turn_off service via developer tools the AC turn off and after a second come back on like with the automation!
This not happen when i call the service after a minute!

So i double the climate.turn_off call in my automation and now work!

That’s weird. What does the logbook say caused it to turn back on?

Doesn’t explain why, but if it works… Good enough!

seems toshiba ac integration related!

That’s what I was thinking. You could create an issue on it’s git and see if you can help chase that one down :slight_smile: