Xiaomi IR Remote - Generic Thermostat

Took me a while to make this here is the result:

It maybe messy and not efficient so if you have another way to make it with Xiaomi please share and any suggestions very welcomed

Xiaomi IR Remote and Generic Thermostat component work differently so its little complicated

Xiaomi IR Remote works by sending packages and Generic Thermostat component is simple on/off switch so needed to create 2 switches then 2 thermostats and adjust so only one will work

configuration.yaml: https://pastebin.com/wF97V2nR
automations.yaml: https://pastebin.com/b3fsyKZ1
scripts.yaml: https://pastebin.com/52XxAAec
groups.yaml: https://pastebin.com/ibYq1Asv

5 Likes

THAT’S exactly what i am searching for for month!!! U R THE BEST!!! Thanks… I qwill try it and give feedback :slight_smile:

For me it’s not really clear how u set the temperature

I set target temperature the rest defined in climate component by “cold_tolerance” and “hot_tolerance”

Example for cooling:
target_ temp 24
cold_tolerance 1
hot_tolerance 2
meaning when (temp = 24+2) turn on cooling until (temp = 24-1) so it keeps temperature between 23-26c

Example for heating:
target_temp 24
cold_tolerance 2
hot_tolerance 1
meaning when (temp = 24-2) turn on heating until (temp = 24+1) so it keeps temperature between 22-25c

OK…but how dies it know the it code …that’s what I’m wondering

1 Like

Hi there,

may you post a code of those switches?
(switch.therswitch,switch.accool,switch.acheat)
tnx in advance

I found out

  - platform: template
    switches:
      accool:
        value_template: "{{ is_state('input_boolean.accoolswitch', 'on') }}"
        turn_on:
          service: input_boolean.turn_on
          entity_id: input_boolean.accoolswitch
        turn_off:
          service: input_boolean.turn_off
          entity_id: input_boolean.accoolswitch
  - platform: template
    switches:
      acheat:
        value_template: "{{ is_state('input_boolean.acheatswitch', 'on') }}"
        turn_on:
          service: input_boolean.turn_on
          entity_id: input_boolean.acheatswitch
        turn_off:
          service: input_boolean.turn_off
          entity_id: input_boolean.acheatswitch
  - platform: template
    switches:
      therswitch:
        value_template: "{{ is_state('input_boolean.thermobool', 'on') }}"
        turn_on:
          service: input_boolean.turn_on
          entity_id: input_boolean.thermobool
        turn_off:
          service: input_boolean.turn_off
          entity_id: input_boolean.thermobool
1 Like

Someone here who faces also WiFi connection issues with those devices? Mine won’t react anymore after a couple of minutes/hours I really need stability as they control my climates and for now they just “freeze” after a while …someone here having same issue ?