Setting up a generic thermostat

Hello everyone,

I want to feed my Homematic thermostat with a Lacrosse sensor temperature reading.
By default, my (and many other) Homematic thermostats are using the build-in temperature sensor. This setup works, but I want to use the more exact temperature readings from my Lacrosse temperature/humidity sensors in the according room (further away from the heater).

Let us take the attributes from my livingroom thermostat as example:

[...]
mode: Auto
operation_list: comfort,auto,boost,manual,lowering
operation_mode: auto
temperature: 21
supported_features: 129
**current_temperature: 22.9**
[...]

As you can see, the Homematic thermostat measures 22.9 degree Celsius (at the heater).
At the same time my Lacrosse sensor reports 21.7 degree Celsius for the livingroom.

I want to feed the “current_temperature” attribute of my Homematic thermostat with the Lacrosse temperature reading to have a more precise temperature control.

But, how I can do that? Can someone point me into the right direction please?

Regards,
cheukan

I did something similar with Acurite Sensors.

I used a USB SDR dongle to capture the signal via rtl_433 software and then mqtt to feed the data into Home Assistant. I used Supervisor to continuously run the rtl_433 software and only seeing a small increase in processor usage on my raspberry pi.

You’ll need to check out the documentation on rtl_433 to see if they support your sensors.

Hope that gives you an idea.

Hi cyn, thank you very much for your prompt response. Your solution sounds great, until now I did not do anything with mqtt, but sounds promising also for other use cases.

My Homematic thermostats and my LaCrosse sensors are up and running, as well as integrated into the Home Assistant user interface. For my LaCrosse sensors I followed https://www.home-assistant.io/components/sensor.lacrosse/ including a Jeelink USB dongle.

My challenge: The Homematic thermostats should use the Lacrosse temperature value and not the value from the thermostat itself. This will allow me to be more precise with the heating control.

homematic_lacrosse

I came from FHEM and OpenHab, there it was possible to integrate “channels” or “readings” from other devices.
Currently I’ve no clue if this is more easier or more complicated to do with Home Assistant.

Yikes, I am so sorry I totally misread what you were asking to do. Unfortunately, I don’t know how to do what you are asking.

No problem, thanks cyn. Does anyone else have an idea on this subject?

Is there anyone who has a similar setup? Or is there anyone who can guide me into the right direction?

It seems as if this issue isn’t really specific to HomeMatic thermostats. Basically you want to disable the internal programming of the the thermostat (by setting it to manual mode) and instead use an external sensor to base your automations on (the LaCrosse sensor).

I guess the next best option would be the generic thermostat platform, where the target_sensor is the LaCrosse sensor, and the switch could use the template switch platform that via some services controls the real thermostat entity (on being a high target temperature, off being a low one).

Thanks Daniel for bringing me on track. And yes, this is not HomeMatic specific. So currently my configuration.yaml looks as follows:

sensor:
  - platform: template
    switches:
      livingroom_heater:
        friendly_name: Wohnzimmer heizen
        value_template: '{{states.climate.meq1111111.attributes.operation_mode == "heat"}}'
        turn_on:
          service: climate.set_operation_mode
          data:
            entity_id: climate.meq1111111
            heat: 'True'
        turn_off:
          service: climate.set_operation_mode
          data:
            entity_id: climate.meq1111111
            heat: 'False'

climate:
  - platform: generic_thermostat
    name: Wohnzimmer
    heater: switch.livingroom_heater
# The following sensor refers to my LaCrosse temperature sensor    
target_sensor: sensor.livingroom_temperature
    min_temp: 15
    max_temp: 25
    ac_mode: false
    target_temp: 21
    initial_operation_mode: "off"
    away_temp: 16

This is integrated into my group files via the following snippet:

heating:
  name: Heizung
  view: yes
  entities:
    - group.livingroom_heating

livingroom_heating:
  name: Wohnzimmer
  view: no
  entities:
    - climate.Wohnzimmer

Currently my livingroom thermostat does not respond to any action which was executed from the GUI. What am I missing?

I have never done something like this, so I’m not really helpful with debugging. I would however suggest to rephrase the title of this topic to something more generic to hopefully attract users that are able to help. A change to something like Need help setting up a generic thermostat might do the trick. :+1:

1 Like

Is there anyone with a similar setup who can help me out? Generic thermostats and external temperature sensors as configured above.

I don’t know if my suggestion will make everything work but I’m fairly certain the template switch’s value_template is incorrect.

Replace this:

value_template: '{{states.climate.meq1111111.attributes.operation_mode == "heat"}}'

with this:

value_template: "{{ is_state_attr('climate.meq1111111', 'operation_mode', 'heat') }}"

Here is an example of using is_state_attr:

Personally, I’m a little disappointed with my Generic Thermostat attempt. Have an ecobee4 but have a zone that is so small radiator…a vestibule / coat room which was added years ago by my wife, (whom I refused to run a full thermastat wire to). Had an extra Shelly 1 which I wired at the boiler transformer 24V / 120 V and Tyco Valve 24V (gas Hot Water) . At first I was using just the Shelly App to be on for 20 mins. without any sense of temperature which worked…but also had an extra ecobee sensor loaded in HA unassigned and usable within Generic Thermostat. with the Restful Shelly local mode. Restarting Home Assistant (like happens) just keeps setting it to off, attempting to use heat mode and away, does not respect the configuraiton.yaml settings for away, and makes it run on, so back to off. At the Lovelace tile a little dance needs to be done toggling between setting it to none, Heat and back to Away… Might need to adjust my Automations to include something on reboot or go back to blind heating for 20 mins. Has anyone been there already? Notice that a paragraph on Generic Thermostat docs stating to start in off was probably there for a reason.

This Thread is old but i have actually the same problem, do you find a solution?

Hi,
As I came accross this page and had to solve this problem, here is a solution which would work:

sensor:
  - platform: template
    switches:
      radiator_dining_room_switch:
        value_template: "{{ is_state('climate.radiator_dining_room', 'heat') }}"
        turn_on:
          service: climate.set_temperature
          data:
            temperature: 26
            hvac_mode: heat
          target:
            entity_id: climate.radiator_dining_room
        turn_off:
          service: climate.set_hvac_mode
          data:
            hvac_mode: 'off'
          target:
            entity_id: climate.radiator_dining_room

You’ll need to use the set temperature to turn on as the turn off setup a low temperature which then is always “off”
This is based on the use of a HMIP HmIP-eTRV-2