Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 105842

Automation and time

$
0
0

Hi, I have been doing some automations and my programing knowledge is lacking, I will share an example of an automation I’m done that is working, but that I’m not happy with.

alias: Climate timer
description: ''
trigger:
  - platform: time
    at: '22:00'
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: climate.molnet
            state: heating
            attribute: hvac_action
        sequence:
          - service: climate.set_hvac_mode
            target:
              entity_id: climate.molnet
            data:
              hvac_mode: 'off'
    default: []
  - delay:
      hours: 11
      minutes: 0
      seconds: 0
      milliseconds: 0
  - service: climate.set_hvac_mode
    target:
      entity_id: climate.molnet
    data:
      hvac_mode: heat
mode: single

What this does is to turn of the heater in my bedroom at 22:00 and then turn it back on at 09:00.

The problem I have with this, is that I want it to turn on at 09:00, and not 11:00 hours after it was turned off.

Before this automation, I had two, one for turning it off at 22:00 and one for turning it on at 09:00, that seemed stupid, to have two automations to control one object, so I came up with this new one, but I have not been able to set a firm time and have to now settle with this 11h timer, can anyone help me on how to solve this in a more elegant way?

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 105842

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>