Interfacing 'generic_thermostat' help please

Hi Taras,

I have been using the Ikea rocker switch to manually adjust the generic_thermostat temperature with great success (using the code you offered above) and also have the actual and target thermostat temperature being displayed on an ESP32 TTGO T-Display.

I have also just added a couple of additional automations to allow the same rocker switch to turn the general_thermostat on/off, but wondered if it could all be combined in one, as per your fist solution?

This is the .yaml for the on automation:

alias: New ikea long hold heater on
description: ""
trigger:
  - device_id: d7801919c3628a93bbb9bb67b76594eb
    domain: zha
    platform: device
    type: remote_button_long_press
    subtype: dim_up
condition: []
action:
  - service: climate.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: climate.lounge
mode: single

Or should it all be dooable easier using the blueprint?

Yes, you can combine it, using a choose ot if then in the automationā€™s action section to determine which trigger occurred via its trigger.id. Or just leave it as a separate automation.

Thanks for the reply. Whilst leaving it as one (or more) additional automations makes it easier for me, it always feels ā€˜inefficientā€™? Is it do you know please?

Also, I was hoping to be able to toggle the general_thermostat on/off using one button but I donā€™t think ā€˜toggleā€™ is an available option?

I think itā€™s just a choice of how to organize all the parts involved in a given application (one automation or more).

Correct. Thereā€™s no climate.toggle service call.

1 Like