I did take that into account: (scroll up to the code sections)
alias: CV Aan/Uit
description: ''
trigger:
- platform: template
value_template: >-
{{ states('sensor.setpoint_cv_virtual') >
states('sensor.temperature_cv_virtual') and states('climate.heating') ==
"off" }}
id: StartWarmteVraag
- platform: template
value_template: >-
{{ states('sensor.setpoint_cv_virtual') <
states('sensor.temperature_cv_virtual') and states('climate.heating') ==
"heat" }}
id: EindeWarmteVraag
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: StartWarmteVraag
sequence:
- service: climate.set_hvac_mode
target:
entity_id: climate.heating
data:
hvac_mode: heat
- conditions:
- condition: trigger
id: EindeWarmteVraag
sequence:
- service: climate.set_hvac_mode
target:
entity_id: climate.heating
data:
hvac_mode: 'off'
default: []
mode: restart
the entity in question is defined as a mqtt climate:
climate:
- name: "Heating"
modes:
- "off"
- "heat"
current_temperature_topic: "opentherm-thermostat/current-temperature/get"
mode_command_topic: "opentherm-thermostat/mode/set"
mode_state_topic: "opentherm-thermostat/mode/get"
temperature_command_topic: "opentherm-thermostat/setpoint-temperature/set"
temperature_state_topic: "opentherm-thermostat/setpoint-temperature/get"
min_temp: 12
max_temp: 28
value_template: "{{ value }}"
temp_step: 0.5
You might want to look at this thread i once made for a boost function. While its not exactly for what u want to do. It should be able todo the same thing.
I think in the value_template
add another if statement to check the window sensor and just send a fixed value like 7 degrees to the virtual objects.