Generic Thermostat on/off

Nope.

My problem is that even when I have a temperature set (let’s say 25ºC when room temperature is 23ºC), it still shows ‘Idle’ and it doesn’t seem to turn on the plug (in my example switch.tomada_sala).

Can you try changing the temperature, just to check what should appear next to the temperature (should be Heat?)?

Thanks in advance.

Yes, I do get “Heat” instead of Idle, when the ambient temperature is LOWER than the set temperature. But what you have is a different issue then your first one :slight_smile: You have to post your generic thermostat configuration, and also let us know what plug are you using to control (I presume) the electric heater.

Please use the preformatted text in the editor when posting the configuration (the </> icon).

My configuration for the climate generic thermostat is as it is here and switch + sensor assigned to it, are defined like this:

switch:
  - platform: tplink
    host: 172.16.23.17
    name: "Tomada Sala"
sensor: 
  - platform: mqtt
    state_topic: "sensor_sala"
    name: "Temperatura Sala"
    unit_of_measurement: '°C'

Any idea of why it doesn’t change from Idle?

Thanks in advance.

Does the switch actually turn on? I’ve had issues with tp-link switches where they just stop responding to commands and queries. Can you check whether you can turn the switch at all, maybe it’s crashed. Inspecting the log (located in .homeassistant/home-assistant.log) can help as well

Yes, I can do it manually without issues (nothing in the log either).

Actually this same device has worked properly in the past but I temporarily stopped using it because I could not turn it off…

Once I brought this device again to try your suggestion, I can never get it to go out of Idle, no matter what.

I think that’s the problem - remove the quotation marks around 20! This way you are passing a string, and not a number. Remove the quotes and give it another try and report back :slight_smile:

Nope, same thing.

Even if that was the case, once I would change the temperature to one that should trigger the switch - from within the UI (not via automation), plug should be turned on… and it is not!

I think I have been playing before with set_away and set_mode methods and that may have caused any issue. I already tried changing the entity name, to see if it would make a difference, but also no…

does it turn manually if you switch it as a plug?

anything of use in the logs?

P.S. I mean switching the plug through the HASS UI, not using the physical button

Yep, that’s what I did before, it works perfectly and nothing shows in the logs…

Can you try adding the min_cycle_duration option to something low like 5 seconds.

Example is here: https://home-assistant.io/components/climate.generic_thermostat/

Other than that I’m out of options. I’ve used an HS110 with the generic thermostat component and it worked, but that was half a year ago or more

I tried adding min_cycle_duration and it actually seems to have started to work.

I will need to test more when I have the time, namely the usage you suggested of the input_boolean to turn the thermostat off/on (on restart, even if the previous input_boolean state is being reinstated after a restart using recorder, the thermostat temperature value is not being set accordingly).

Which switch do you have?

Where I live thermostats are simple short circuit two cables (on) or keep open (off). How you use a hs110?

My “thermostat” is per-room. I.e. there’s a temperature sensor that reports the room’s ambient temperature and a “smart socket” - e.g. TP-Link HS110 - that turns on an electric heater. Heaters are rated at 1.250 kWs so they don’t exceed the HS110s power rating.

It’s not a centralized thermostat.

You have electric heater in each room?

My situation is a central gas heater

I have an heater with a TP-Link switch, per room, that’s why I plan to use this thermostat.

Yes, I do use electric heaters. If you have a central gas heater, I don’t think you should be using an electric switch to control the gas heater itself.

Gas heater uses electric switch to turn on anyway. You are just adding some brains to switch.
Here is how that looks at my place.

Vote for this feature.

It is really clear if I can use service climate.turn_on or climate.turn_off to turn the thermostat on or off. set_operation_mode to HEAT or OFF is not very straight forward.

I set mine to off whenever someone arrives home (for WAF reasons)

- alias: set temp when home
  trigger:
    platform: state
    entity_id: group.tracking
    from: 'not_home'
    to: 'home'
  action:
    - service: climate.set_operation_mode
      data:
       entity_id: climate.thermostat
       operation_mode: "off"

To turn it back on I set it to heat