jmcollin78 / versatile_thermostat

A full featured Thermostat for Home Assistant: presets, window, motion, presence and overpowering management
MIT License
314 stars 34 forks source link

[Feature Request] Support for external Setpoint and Mode management #413

Closed alexus1211 closed 7 months ago

alexus1211 commented 7 months ago

Hi,

I would like to propose adding the support for external Wall Thermostats, which not only they provide temperature, but also provide the ability to set the Setpoint (target temperature) and Modes (Heat, Cool, etc..) directly on these dievices. I use for example the Danfoss Room Sensor 014G0160: https://manual.zwave.eu/backend/make.php?lang=EN&sku=DAN_RS-Z&cert=ZC08-14070002

It is battery operated and with it I can control the setpoint in my room. I achieve that today using the following rule in HASS:

alias: Sync Setpoint - LR
description: ""
trigger:
  - platform: state
    entity_id:
      - climate.room_sensor
    attribute: temperature
  - platform: state
    entity_id:
      - climate.vthermo_living_room
    attribute: temperature
condition:
  - condition: template
    value_template: >-
      {{ state_attr('climate.room_sensor', 'temperature')|float !=
      state_attr('climate.vthermo_living_room', 'temperature')|float }}
action:
  - service: climate.set_temperature
    metadata: {}
    data:
      temperature: "{{ trigger.to_state.attributes.temperature }}"
    target:
      entity_id: climate.vthermo_living_room
  - service: climate.set_temperature
    metadata: {}
    data:
      temperature: "{{ trigger.to_state.attributes.temperature }}"
    target:
      entity_id: climate.room_sensor
mode: single

Furthermore, there are some similar Wall Thermostats (either WLAN or Zigbee) that offer the same functionality and some additional functionalities like the ability to change the modes. Since modes are not always mapped correctly between manufacturers, here it would be great if you can provide a menu where the user can setup a king of modes-mapping between the wall thermostat and VThermo modes.

Looking forward to your reply

jmcollin78 commented 7 months ago

Hello @alexus1211,

Before going further, I will try to repeat your proposal. Your idea is to synchronize the physical Wall climate (climate.vthermo_living_room ) with another climate (a VTherm ?) named climate.room_sensor.

Did you know that the VTherm climate of type over_climate is doing exactly what you want ? Its purpose is to synchronize its values (temp and mode) with the underlying one (the wall climate).

But maybe I don't understand exactly your point.

alexus1211 commented 7 months ago

The physical wall thermostat has the entity climate.room_sensor. Any change there in the target temperature needs to be synchronized with the entity of Vthermo, in my case it’s the entity climate.vthermo_living_room. This synchronization is a two-way road. I have to account for the fact that the physical wall thermostat is a battery operated device that gets updated only on wake up, which happens each 10mn in my case. That’s why you have the condition template to avoid continuous setting of the target on both ends. Hope I‘ve made it clearer. By the way, I haven’t tried type over_climate. I am using the valve type to drive the valves directly with tpi algorithm (which by the way works very well and efficiently for my case)

jmcollin78 commented 7 months ago

VThermo is the Versatile Thermostat over_valve climate ?

alexus1211 commented 7 months ago

Yes

jmcollin78 commented 7 months ago

Ok, I've got it now. I will repeat:

If I have a good understanding here is what you could try (should work out of the box):

  1. create a new VTherm of type over_climate and put your over_valve VTherm as underlying. You should have one per zone and you can put as many over_valve you have in the zone,
  2. create a new VTherm of type over_climate (the master VTherm) and put the zones over_climate AND the Wall climate as underlying.

Because over_climate are synchronized in two way with their underlyings climate (wall and TVR) this should do exactly what you want.

alexus1211 commented 7 months ago

Thanks, I can confirm it works as you suggested. But it seems not that efficient having two instances of Versatile Thermostat to do such a basic thing. Maybe it makes more sense to have a hybrid type that brings in both types (over_valve and over_climate) or maybe all types together and let the user select what is necessary to their setup.

tbrasser commented 7 months ago

qq: which TRVs do you have that let you control the valve directly? I'm trying tuya, aqara and Bosch and they all have their own quirks.

jmcollin78 commented 7 months ago

The SHELLY TRV seems perfect from what I heard: direct control of the valve.

alexus1211 commented 7 months ago

I am using a Zwave one from Eurotronics called Spirit Zwave+. Needs to be configured in Manufacturer mode to let it be directly controlled.