climate:
platform: generic_thermostat
name: Salon
heater: switch.gsalon
target_sensor: sensor.netatmo_parter_temperature
min_temp: 28
max_temp: 30
target_temp: 30
min_cycle_duration:
seconds: 3
automation:
- alias: Grzejnik salon on
trigger:
platform: time
after: "17:08:00"
action:
- service: climate.set_operation_mode
data:
entity_id: climate.salon
operation_mode: Heat
I want turn on thermostat after specific time and tur it off on another time. Above automation doesn’t works
Log Error:
ERROR:homeassistant.core:BusHandler:Exception doing job
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/homeassistant/core.py", line 1224, in job_handler
func(*args)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/core.py", line 1087, in execute_service
service_handler.func(service_call)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/climate/__init__.py", line 329, in operation_set_service
climate.set_operation_mode(operation_mode)
File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/climate/__init__.py", line 512, in set_operation_mode
raise NotImplementedError()
NotImplementedError
So doing it with climate, as Danielhiversen mentioned, you can use climate.set_temperature, so that the “thermostat” has a low target temperature when you don’t want the heater on, and a high (i.e. > 23) temperature when you do. My automation looks like this:
automation:
- alias: Reduce the target temperature overnight
initial_state: True
hide_entity: False
trigger:
platform: time
minutes: 50
seconds: 0
condition:
condition: time
after: '21:45:00'
before: '06:00:00'
action:
service: climate.set_temperature
data:
entity_id: climate.heating
temperature: 14
- alias: Reset the target temperature
initial_state: True
hide_entity: True
trigger:
platform: time
after: '06:00:00'
action:
service: climate.set_temperature
data:
entity_id: climate.heating
temperature: 20.5
hope that is clearer. But i agree it’s not much simpler
It’s bad that I have some experience? Domoticz has better support and documentation, here simple things are more complicated because of coding everything. But it’s good when flexibility is needed. That’s why I’m here.
I’ve found (in the generic thermostat module), that setting operation_mode in the set_temperature service call, does not do anything to the operation_mode (possibly a bug or incorect documentation) I ended up doing a separate call:
With a presence detection you can automate the climate. If person X is at home then turn on climate to temp X. You can do this between a specific time period. The same to turn of the climate when person X is not home and on a specific time.
Turn on temp:
alias: Toon - inschakelen
description: ‘’
trigger:
at: 08:16:00
platform: time
condition:
after: 08:15:00
before: ‘21:15:00’
condition: time
condition: state
entity_id: group.allpersons
state: home
action:
I am in now way affiliated with this person. I say this because I’ve posted this in a few topics. This add-on is ideal because you can set up a schedule to assign a specific temperature whenever you want. You can use an automation to turn the schedule on/off based on your conditions. Might be worth a look