Files
ad_trident/apps/global/heating.yaml
T
2026-11-10 19:10:32 +01:00

274 lines
10 KiB
YAML

heating_sensors:
module: virtualsensors
class: VirtualSensorsApp
priority: 10 # default priority app is 50, since most of them require sensors created by virtual sensors, it's important that virtual_sensors start first
sensors:
binary_sensor.heatpump_winter_mode:
local_expressions:
temp_threshold: "self ? 20 : 15"
trigger_conditions: sensor.min_temp_outside < temp_threshold
value_selector.target_temperature_heatpump:
attributes:
unit_of_measurement: °C
device_class: temperature
icon: mdi:thermometer
values:
winter_mode:
conditions: binary_sensor.heatpump_winter_mode
value: input_number.heatpump_temperature_winter
default:
conditions: True
value: input_number.heatpump_temperature
smart_heating_templates_library:
module: templatelibrary
class: TemplateLibrary
priority: 1
templates_library:
clim_conditions:
local_expressions:
temp_threshold: "sleeping_in_the_room ? 0 : (ext_temperature >= 35 ? 0.5 : 1)"
trigger_conditions:
- "not binary_sensor.heatpump_winter_mode and (ext_temperature >= room_temperature or ext_temperature >= target_temperature or cant_open_window) and room_temperature >= (quick_resume ? target_temperature : (target_temperature + temp_threshold))"
- not binary_sensor.heatpump_winter_mode and self and (ext_temperature >= target_temperature or cant_open_window)
- binary_sensor.heatpump_winter_mode and room_temperature < target_temperature and ext_temperature <= target_temperature
- binary_sensor.heatpump_winter_mode and self and room_temperature < target_temperature + 1
blocking_conditions:
- binary_sensor.is_everybody_sleeping and not sleeping_in_the_room and not stay_on_while_sleeping
- binary_sensor.is_everybody_sleeping and binary_sensor.heatpump_winter_mode
- not room_occupancy and not (sleeping_in_the_room or (occupied_tonight and binary_sensor.day_interval_night))
- not binary_sensor.someone_home
- window_open
desk_heatpump:
module: smartheatpump
class: SmartHeatpump
entity: climate.desk_heatpump
templates_library: smart_heating_templates_library
constants:
window_open: binary_sensor.desk_window
ext_temperature: sensor.ext_front_temperature
room_temperature: sensor.desk_temperature
room_occupancy: binary_sensor.desk_occupancy
target_temperature: sensor.target_temperature_heatpump
cant_open_window: binary_sensor.is_desk_sleeping
sleeping_in_the_room: binary_sensor.is_desk_sleeping
quick_resume: binary_sensor.desk_heatpump_quick_resume
occupied_tonight: input_boolean.desk_occupied_tonight
stay_on_while_sleeping: true
virtual_sensors:
sensors:
value_selector.desk_heatpump_fan_mode:
auto: binary_sensor.heatpump_winter_mode or room_temperature > target_temperature + 1
quiet: True
target_temperature: sensor.target_temperature_heatpump
hvac_mode: "binary_sensor.heatpump_winter_mode ? 'heat' : 'cool'"
fan_mode: sensor.desk_heatpump_fan_mode
smart_conditions:
callback_delay: 10 # on the morning it can happen that we ask to start and stop the heat pump immediately afterwards which in result in the heat pump ignoring the second command
template_conditions: <clim_conditions>
control_mode_selector:
sensor: input_select.desk_heatpump_override
reset_events:
- good_morning
- good_bye
quick_resume:
sensor: binary_sensor.desk_heatpump_quick_resume
reset_events: good_morning
#input_buttons:
# turn_on: input_button.clim_du_bureau_turn_on
# turn_off: input_button.clim_du_bureau_turn_off
bedroom_heatpump:
module: smartheatpump
class: SmartHeatpump
entity: climate.bedroom_heatpump
templates_library: smart_heating_templates_library
constants:
window_open: binary_sensor.bedroom_french_door
ext_temperature: sensor.ext_front_temperature
room_temperature: sensor.bedroom_temperature
room_occupancy: binary_sensor.bedroom_occupancy
target_temperature: sensor.target_temperature_heatpump
cant_open_window: binary_sensor.bedroom_cant_open_window
sleeping_in_the_room: binary_sensor.is_bedroom_sleeping
quick_resume: binary_sensor.bedroom_heatpump_quick_resume
occupied_tonight: input_boolean.bedroom_occupied_tonight
stay_on_while_sleeping: false
virtual_sensors:
sensors:
binary_sensor.bedroom_cant_open_window: binary_sensor.is_bedroom_sleeping or sensor.ext_back_humidity > 65
value_selector.bedroom_heatpump_fan_mode:
auto: binary_sensor.heatpump_winter_mode or room_temperature > target_temperature + 1
quiet: True
target_temperature: "sensor.target_temperature_heatpump - (binary_sensor.heatpump_winter_mode ? 1 : 0.5)"
hvac_mode: "binary_sensor.heatpump_winter_mode ? 'heat' : 'cool'"
fan_mode: sensor.bedroom_heatpump_fan_mode
smart_conditions:
callback_delay: 10 # on the morning it can happen that we ask to start and stop the heat pump immediately afterwards which in result in the heat pump ignoring the second command
template_conditions: <clim_conditions>
quick_resume:
sensor: binary_sensor.bedroom_heatpump_quick_resume
reset_events: good_morning
control_mode_selector:
sensor: input_select.bedroom_heatpump_override
reset_events:
- good_morning
- good_bye
living_room_heatpump:
module: smartheatpump
class: SmartHeatpump
entity: climate.living_room_heatpump
templates_library: smart_heating_templates_library
virtual_sensors:
sensors:
binary_sensor.living_room_any_window_open: binary_sensor.living_room_french_door or binary_sensor.living_room_window
binary_sensor.living_room_cant_open_window: binary_sensor.is_living_room_sleeping or binary_sensor.projector_on or sensor.ext_back_humidity > 65
value_selector.living_room_heatpump_fan_mode:
auto: binary_sensor.heatpump_winter_mode or room_temperature > target_temperature + 1
quiet: True
constants:
window_open: binary_sensor.living_room_any_window_open
ext_temperature: sensor.ext_back_temperature
room_temperature: sensor.living_room_temperature
room_occupancy: binary_sensor.living_room_occupancy
target_temperature: sensor.target_temperature_heatpump
cant_open_window: binary_sensor.living_room_cant_open_window
sleeping_in_the_room: binary_sensor.is_living_room_sleeping
quick_resume: binary_sensor.living_room_heatpump_quick_resume
occupied_tonight: input_boolean.living_room_occupied_tonight
stay_on_while_sleeping: false
target_temperature: "sensor.target_temperature_heatpump + (binary_sensor.heatpump_winter_mode ? 0 : 0.5)"
hvac_mode: "binary_sensor.heatpump_winter_mode ? 'heat' : 'cool'"
fan_mode: sensor.living_room_heatpump_fan_mode
smart_conditions:
callback_delay: 10 # on the morning it can happen that we ask to start and stop the heat pump immediately afterwards which in result in the heat pump ignoring the second command
template_conditions: <clim_conditions>
control_mode_selector:
sensor: input_select.living_room_heatpump_override
reset_events:
- good_morning
- good_bye
quick_resume:
sensor: binary_sensor.living_room_heatpump_quick_resume
reset_events: good_morning
guestroom_heatpump:
module: smartheatpump
class: SmartHeatpump
entity: climate.guestroom_heatpump
templates_library: smart_heating_templates_library
constants:
window_open: binary_sensor.guestroom_window
ext_temperature: sensor.ext_front_temperature
room_temperature: sensor.guestroom_temperature
room_occupancy: binary_sensor.guestroom_occupancy
target_temperature: sensor.target_temperature_heatpump
cant_open_window: binary_sensor.is_guestroom_sleeping
sleeping_in_the_room: binary_sensor.is_guestroom_sleeping
quick_resume: binary_sensor.guestroom_heatpump_quick_resume
occupied_tonight: input_boolean.guestroom_occupied_tonight
stay_on_while_sleeping: false
virtual_sensors:
sensors:
value_selector.guestroom_heatpump_fan_mode:
auto: binary_sensor.heatpump_winter_mode or room_temperature > target_temperature + 1
quiet: True
target_temperature: sensor.target_temperature_heatpump - 0.5
hvac_mode: "binary_sensor.heatpump_winter_mode ? 'heat' : 'cool'"
fan_mode: sensor.guestroom_heatpump_fan_mode
smart_conditions:
callback_delay: 10 # on the morning it can happen that we ask to start and stop the heat pump immediately afterwards which in result in the heat pump ignoring the second command
template_conditions: <clim_conditions>
quick_resume:
sensor: binary_sensor.guestroom_heatpump_quick_resume
reset_events: good_morning
control_mode_selector:
sensor: input_select.guestroom_heatpump_override
reset_events:
- good_morning
- good_bye
radiator_heating:
module: boilerclimate
class: BoilerClimate
entity: climate.radiator_heating
display_name: Chauffage radiateurs
unique_id: appdaemon_radiator_heating
indoor_sensor: sensor.corridor_temperature
outdoor_sensors:
- sensor.ext_front_temperature
- sensor.ext_back_temperature
target_temperature: 18
initial_mode: heat
smart_conditions:
unavaibility_result: Failed #if something is unavailable in the expression, the radiator stay off
local_expressions:
outdoor_temperature: "sensor.ext_front_temperature < sensor.ext_back_temperature ? sensor.ext_front_temperature : sensor.ext_back_temperature"
trigger_conditions: binary_sensor.someone_home and outdoor_temperature < self.temperature
blocking_conditions:
- binary_sensor.group_windows
- binary_sensor.kitchen_french_door or binary_sensor.living_room_french_door or binary_sensor.bedroom_french_door
# Radiator heating enabled with the room-thermostat bridge CLOSED.
# false keeps the climate/diagnostics but suppresses SetMode writes.
send_commands: true
command_interval: 60
mqtt_topic: appdaemon/radiator_heating
mqtt_namespace: mqtt
mqtt_connection_topic: appdaemon/radiator_heating/connection
boiler_topic: themaplus-condens
# Starting values, to tune from observations with radiator circulation enabled.
regulation:
slope: 1.5
offset: 10
kp: 5
ki: 0.2 # water °C / (room °C * hour)
integral_limit: 8
correction_limit: 12
min_flow: 30
max_flow: 50
overheat: 0.5
restart_margin: 0.1
radiator_heating_watchdog:
module: boilerwatchdog
class: BoilerWatchdog
mqtt_namespace: mqtt
mqtt_topic: appdaemon/radiator_heating
heartbeat_timeout: 180