Generic thermostat with hue light plug

hello i’m a beginner, i have a hue light plug with an electric heater connected.
I setup a generic thermostat but it does not switch the plug. i asume its because it requires a switch.
It always stays on IDLE.
So i tried to create a template switch, but i cant get the switch to properly reflect the state of the hue plug.
It always jumps back to on or off, depending on what template i use.

What am i doing wrong ? Thanks for your help.

config:

climate:
  - platform: generic_thermostat
    name: Martin Thermostat
    heater: switch.hueplug_workaround
    target_sensor: sensor.martin
    target_temp: 24.5
    tolerance: 0.5
    min_cycle_duration:
      seconds: 300

switch:
  - platform: template
    switches:
      hueplug_workaround:
        value_template: "{{ states('light.heater') }}"
        turn_on:
        - service: light.turn_on
          data:
            entity_id: light.heater
        turn_off:
        - service: light.turn_off
          data:
            entity_id: light.heater
        entity_id: climate.martin_thermostat

First suspect would be ‘value_template’ of course.
Can you test that template in Templates (3rd icon under development tools in the menu)

Just paste {{ states('light.heater') }} in the input (left) and see what the output it (right)

I think you should also entity_id: climate.martin_thermostat from the template switch, I don’t see support for that mentioned anywhere and it might throw some things of.

Thanks, {{ states(‘light.heater’) }} outputs off on, i removed the line, now the template switch works, it is in snyc with the light.heat now but the generic_thermostat does not heat still, i set target to 28 and current is 23.9 but it is not switching the switch on. still says idle

current_temperature: 23.9
min_temp: 7
max_temp: 35
temperature: 28
operation_mode: idle
operation_list: auto,off

Hi,

generic thermostat is triggered by sensor temp change, or by setpoint (target temp) change. So wait for sensor temp change, or try change target temp in web GUI.

I have the same problem. I get a switch in the GUI that is in sync with the light control. But the genric thermostat never starts “heating”. Manually turning on the switch, changes the thermostat to heating…

What is missing ? :slight_smile:

home assistand version 0.58 my working config is as followed:

climate:
  - platform: generic_thermostat
    name: Martin Thermostat
    heater: switch.hueplug_workaround
    target_sensor: sensor.martin
    target_temp: 24
    cold_tolerance: 0.5
    hot_tolerance: 0
    min_temp: 15
    max_temp: 28
    min_cycle_duration:
      seconds: 10

switch:
  - platform: template
    switches:
      hueplug_workaround:
        value_template: "{{ states('light.heater') }}"
        turn_on:
        - service: light.turn_on
          data:
            entity_id: light.heater
        turn_off:
        - service: light.turn_off
          data:
            entity_id: light.heater

Change to allow any toggle-type device is merged. Should be in next HA release.

1 Like