hass-template-climate
hass-template-climate copied to clipboard
[FR]: Example of hvac_action_template
Is your feature request related to a problem? Please describe.
Some more examples could probably help out how the integration is working
Describe the solution you'd like
So I have a floor temperature system that is controlled using a shelly plug and an external temperture sensor. I want to add some more feeling that this is actually a thermostat. I have tried some examples but can't really figure it out so I need some help. So right now I can see the current temp, my target temp. I have even solved that if I switch my shelly plug on the climate control says "heating". What I want now is to be able to control the shelly plug from the climate control and I guess I need to use the hvac_action_template but I can't figure out how to do it. So choosing off in climate I of course want to send switch.off and choosing "heat" a switch command switch.on. Here is my yaml so far, I understand I miss the action part but how to do that?
`- platform: climate_template name: floortemperature min_temp: 15 max_temp: 30 temp_step: 1 modes: - "off" - "heat"
current_temperature_template: "{{ states('sensor.current_temperature') }}" target_temperature_template: "{{ states('input_number.target_temperature') }}" hvac_mode_template: > {% if is_state('switch.shelly_shplg_s_80646f83b61e', 'on') %} heat {% else %} off {% endif %}
set_temperature: service: input_number.set_value target: entity_id: input_number.target_temperature data: value: "{{ temperature }}"`
Describe alternatives you've considered
No response
Additional context
No response
For your needs no read-only templates (used for mapping) can be used (like "hvac_action_template") Use "set_hvac_mode" instead.
Take a look here: https://developers.home-assistant.io/docs/core/entity/climate/#hvac-action