Tasmota MQTT IRHVAC Controller

The secon one is better way … :slight_smile:

Hi @gh0s7 did you get a chance to have a look at my issue on GitHub ?

@gh0s7 I just wanted to let you know that you did an amazing job. It worked straight away. Where is the “buy me a coffee” in your github? It’s the least i can do for the time and effort you spent making this. Thank you!

I want to ask only one thing cause i noticed that the ir blast almost every command two times.
This is the log from tasmota when i turn on climate in home assistant.

02:28:13 MQT: stat/tasmota/RESULT = {"IRHVAC":{"Vendor":"SAMSUNG_AC","Model":-1,"Power":"On","Mode":"Cool","Celsius":"On","Temp":16,"FanSpeed":"High","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"Off","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}
02:28:13 MQT: tele/tasmota/RESULT = {"IrReceived":{"Protocol":"SAMSUNG_AC","Bits":168,"Data":"0x0x02920F000000F001D20F0000000001E2FE718011F0","Repeat":0,"IRHVAC":{"Vendor":"SAMSUNG_AC","Model":-1,"Power":"On","Mode":"Auto","Celsius":"On","Temp":16,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"Off","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}}

Home Assistant Config.

#YAML

climate:
  - platform: tasmota_irhvac
    name: Samsung AC Living Room
    command_topic: "cmnd/tasmota/irhvac"
    state_topic: "tele/tasmota/RESULT"
    temperature_sensor: sensor.thermokrasia #optional this sensor is used to display current temp on the AC card
    protocol: "SAMSUNG_AC"
    min_temp: 16 #optional - default 16 int value
    max_temp: 30 #optional - default 32 int value
    target_temp: 25 #optional - default 26 int value
    initial_operation_mode: "off" # optional - default "off" string value
    away_temp: 24 #optional - default 24 int value
    precision: 1.0 #optional - default 1.0 float value
    supported_modes:
      - heat
      - cool
      - dry
      - fan_only
      - auto
      - "off" #Turns the AC off - Should be quoted and should be always included here
    supported_fan_speeds:
      #- low
      #- max
      - high
      - medium
      #- middle
      #- focus
      #- diffuse
      - min
      - auto
    supported_swing_list:
      - "off"
      - vertical #up to down
      #- horizontal # Left to right - remove if your AC does not support it
      #- both # remove if your AC does not support horizontal
    hvac_model: "-1" # string value
    celsius_mode: "On" #optional - default "On" string value - you can remove it if you use celsius

Hi. I have completed all the steps. It all works perfectly. The only thing is that I can’t turn on my air conditioner by hass. if opened by remote and then adjust the temperature, or the other degrees, then normal. Where is the error?
Model: SHARP_AC

What about this error ?
[custom_components.tasmota_irhvac.climate] Unable to update from sensor: could not convert string to float: ‘unknown’

Wait for a fix ?

Hey. I am using Home Assistant Core 0.0.112.4 and Tuya Smart Remote Controller Smart Life APP Control with 8.2.0 (tasmota). I have a TADIRAN, air conditioner, “Protocol”, remote control protocol: “KELVINATOR”. But your component sees it as “Protocol”: “GREE”. And so when I turn it on from the remote in HA no change. You can help me?

 MQT: stat/Bedroom/RESULT = {"IRHVAC":{"Vendor":"KELVINATOR","Model":-1,"Power":"On","Mode":"Cool","Celsius":"On","Temp":25,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"On","Light":"On","Filter":"On","Clean":"On","Beep":"Off","Sleep":-1}}
 MQT: tele/Bedroom/RESULT = {"IrReceived":{"Protocol":"GREE","Bits":64,"Data":"0x0x0909E050000000C0","Repeat":0,"IRHVAC":{"Vendor":"GREE","Model":1,"Power":"On","Mode":"Cool","Celsius":"On","Temp":25,"FanSpeed":"Auto","SwingV":"Auto","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"On","Beep":"Off","Sleep":-1}}}
 MQT: tele/Bedroom/RESULT = {"IrReceived":{"Protocol":"KELVINATOR","Bits":128,"Data":"0x0x090940500240000009094070000000C0","Repeat":0,"IRHVAC":{"Vendor":"KELVINATOR","Model":-1,"Power":"On","Mode":"Cool","Celsius":"On","Temp":25,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"Off","Filter":"On","Clean":"Off","Beep":"Off","Sleep":-1}}}

Hi @Daniel123-lab did you try updating to the latest Tasmota-IR that came out a few days ago? It should be Tasmota 8.4.0 and it has an updated version of the IR library that tasmota includes.

-DM

@ghos7 thank for your great project! I integrated it in my HA and can control my AC. However, my HA cannot read the data (temperature) from AC remote, but I check it tasmota console, it can read the IR code from AC remote. I dont know what I miss in the config? Can you advice me to fix this?

script in my config file

##############IR tasmota ###############
  - platform: tasmota_irhvac
    name: "Panasonic IRHvac"
    command_topic: "cmnd/YTF_IR/irhvac"
    state_topic: "tele/YTF_IR/RESULT"
    temperature_sensor: sensor.bedroom_temp
    protocol: "PANASONIC_AC"
    min_temp: 16 #optional - default 16 int value
    max_temp: 32 #optional - default 32 int value
    target_temp: 27 #optional - default 26 int value
    initial_operation_mode: "cool" # optional - default "off" string value (one of the "supported_modes")
    away_temp: 27 #optional - default 24 int value
    precision: 1 #optional - default 1 int or float value. Can be set to 1, 0.5 or 0.1
    supported_modes:
      # - "heat"
      - "cool"
      - "dry"
      # - "fan_only"
      - "auto"
      - "off" #Turns the AC off - Should be quoted
      # Some devices have "auto" and "fan_only" chaned
      # If following two lines are uncommented, "auto" and "fan" shoud be commented
      #- auto_fan_only #if remote shows fan but tasmota says auto
      #- fan_only_auto #if remote shows auto but tasmota says fan
    supported_fan_speeds:
      # Some devices say max,but it is high, and auto which is max
      # If you uncomment the following two, you have to comment high and max
      # - auto_max #woud become max
      # - max_high #would become high
      #- on
      #- off
      # - "low"
      - "min"
      - "medium"
      - "high"
      #- middle
      #- focus
      #- diffuse
      # - "min"
      # - "max"
      #- auto
    supported_swing_list:
      - "off"
      - "vertical" #up to down
      - "horizontal" # Left to right
      # - both
    default_quiet_mode: "Off" #optional - default "Off" string value
    default_turbo_mode: "Off" #optional - default "Off" string value
    default_econo_mode: "Off" #optional - default "Off" string value
    hvac_model: "-1" #optional - default "1" string value
    celsius_mode: "On" #optional - default "On" string value
    default_light_mode: "Off" #optional - default "Off" string value
    default_filter_mode: "Off" #optional - default "Off" string value
    default_clean_mode: "Off" #optional - default "Off" string value
    default_beep_mode: "Off" #optional - default "Off" string value
    default_sleep_mode: "-1" #optional - default "-1" string value




###############IR tasmota############## 

code in my script.yaml

ir_code:
  sequence:
  - data_template:
      payload: '{"Protocol":"{{ protocol }}","Bits": {{ bits }},"Data": 0x{{ data }}}'
      topic: 'cmnd/YTF_IR/irsend'
    service: mqtt.publish
ir_raw:
  sequence:
  - data_template:
      payload: '0, {{ data }}'
      topic: 'cmnd/YTF_IR/irsend'
    service: mqtt.publish

Hi great projet but one problem . Is it possible to switch off and on ac when the temperature reaches the set one?

Hello,
I configured an AC with MQTT HVAC with ESP8266 board.
It’s the configuration.yaml:

climate:
  - platform: mqtt
    name: AC_Receiver_LivingRoom
    unique_id: '1'
    qos: 1
    precision: 1.0
    retain: true
    modes:
      - "off"
      - "cool"
      - "heat"
    min_temp: 16
    max_temp: 30
    payload_on: 'on'
    payload_off: 'off'
    
    power_command_topic: 'cmnd/AC_Receiver/IRhvac'
    power_state_topic: 'tele/AC_Receiver/RESULT'
    power_state_template: '{{ value_json["IrReceived"]["IRHVAC"]["Power"] }}'
    
    mode_command_topic: 'cmnd/AC_Receiver/IRhvac'
    mode_state_topic: 'tele/AC_Receiver/RESULT'
    mode_state_template: '{{ value_json["IrReceived"]["IRHVAC"]["Mode"] | lower }}'


    temperature_command_topic: 'cmnd/AC_Receiver/IRhvac'
    temperature_state_topic: 'tele/AC_Receiver/RESULT'
    temperature_state_template: '{{ value_json["IrReceived"]["IRHVAC"]["Temp"] }}'

I have a script that sending mqtt to the AC:


'1587984879652':
   alias: AC Commands
   sequence:
   - service: mqtt.publish
     data:
      topic: cmnd/AC_Receiver/IRhvac
      payload_template: >
        {% if is_state('climate.ac_receiver_livingroom','off') %} {"Vendor":"GREE","Power":"off", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','heat') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 16 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','heat') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 17 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','heat') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 18 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}}
        {% elif is_state('climate.ac_receiver_livingroom','heat') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 19 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','heat') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 20 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','heat') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 21 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','heat') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 22 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}}
        {% elif is_state('climate.ac_receiver_livingroom','heat') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 23 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','heat') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 24 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}}
        {% elif is_state('climate.ac_receiver_livingroom','heat') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 25 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}}
        {% elif is_state('climate.ac_receiver_livingroom','heat') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 26 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','heat') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 27 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','heat') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 28 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','heat') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 29 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','heat') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 30 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}}
        {% elif is_state('climate.ac_receiver_livingroom','cool') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 16 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','cool') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 17 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','cool') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 18 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}}
        {% elif is_state('climate.ac_receiver_livingroom','cool') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 19 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}}
        {% elif is_state('climate.ac_receiver_livingroom','cool') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 20 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','cool') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 21 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','cool') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 22 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','cool') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 23 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}}
        {% elif is_state('climate.ac_receiver_livingroom','cool') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 24 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','cool') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 25 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','cool') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 26 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','cool') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 27 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}}
        {% elif is_state('climate.ac_receiver_livingroom','cool') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 28 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','cool') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 29 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}} 
        {% elif is_state('climate.ac_receiver_livingroom','cool') and state_attr('climate.ac_receiver_livingroom','temperature')|int == 30 %} {"Vendor":"GREE","Power":"on", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature')}}}
        {% endif %}

I have an IR trasnmitter and IR reciever. When I press the remote of the AC it changing the UI of the AC in the home assistant and sends mqtt to the AC. It’s working.
But I have a problem that when I am trying to turn on the AC or change mode or temperature from the UI of the home assistant it doesn’t work and it writes in the console of the ESP8266:

12:33:24 CMD: Group 0, Index 1, Command "IRHVAC", Data "25.0"
12:33:24 MQT: stat/AC_Receiver/RESULT = {"IRHVAC":"Invalid JSON"}
12:33:26 MQT: Received Topic "cmnd/AC_Receiver/IRhvac", Data Size 4, Data "25.0"

I writed an automation that in every change in the state of the entity climate.climate.ac_receiver_livingroom it will activate the script but it doesn’t work. I want to control the AC from the UI.
It’s the automation:

- id: '1596884572019'
  alias: AC changed
  description: ''
  trigger:
  - entity_id: climate.ac_receiver_livingroom
    platform: state
  condition: []
  action:
  - data: {}
    service: script.1587984879652
  mode: single

Someone can help me?

Create an automation in Home Assistant to turn it off when the temp sensor reaches the desired temperature

What I suggest is a different approach. It doesn’t use the script you created or the automation. If you wish to try my approach, you must either disable or delete automation.ac_changed.

Climate

The climate configuration is slightly different.

  • It doesn’t require power_command_template.
  • mode_command_topic and temperature_command_topic publish to “middleman” topics (climate/hvac_mode and climate/temperature) that are used by two new automations.
  • It doesn’t use retain: true because that’s not normally advisable when publishing to command topics.
climate:
  - platform: mqtt
    name: AC_Receiver_LivingRoom
    unique_id: '1'
    qos: 1
    precision: 1.0
    modes:
      - "off"
      - "cool"
      - "heat"
    min_temp: 16
    max_temp: 30
    payload_on: 'on'
    payload_off: 'off'
    
    power_state_topic: 'tele/AC_Receiver/RESULT'
    power_state_template: '{{ value_json["IrReceived"]["IRHVAC"]["Power"] }}'
    
    mode_command_topic: climate/hvac_mode
    mode_state_topic: 'tele/AC_Receiver/RESULT'
    mode_state_template: '{{ value_json["IrReceived"]["IRHVAC"]["Mode"] | lower }}'


    temperature_command_topic: climate/temperature
    temperature_state_topic: 'tele/AC_Receiver/RESULT'
    temperature_state_template: '{{ value_json["IrReceived"]["IRHVAC"]["Temp"] }}'

Automations

This approach uses two automations.

  1. The first one subscribes to climate/hvac_mode. It converts the received payload (hvac mode) into the JSON format required by your physical thermostat and publishes it to cmnd/AC_Receiver/IRhvac.
  2. The second one subscribes to climate/temperature. It converts the received payload (temperature) into the JSON format required by your physical thermostat and publishes it to cmnd/AC_Receiver/IRhvac.
- alias: 'Convert hvac_mode'
  description: 'Convert HVAC mode to GREE'
  trigger:
    platform: mqtt
    topic: climate/hvac_mode
  action:
    service: mqtt.publish
    data_template:
      topic: cmnd/AC_Receiver/IRhvac
      payload: >
        {% set pwr = trigger.payload if trigger.payload != 'off' else 'off' %}
        {"Vendor":"GREE","Power":"{{pwr}}", "Mode":"{{trigger.payload}}","FanSpeed":"Max","Temp":{{state_attr('climate.ac_receiver_livingroom','temperature') | int}}}


- alias: 'Convert temperature'
  description: 'Convert temperature to GREE'
  trigger:
    platform: mqtt
    topic: climate/temperature
  action:
    service: mqtt.publish
    data_template:
      topic: cmnd/AC_Receiver/IRhvac
      payload: >
        {% set pwr = 'on' if states('climate.ac_receiver_livingroom') != 'off' else 'off' %}
        {"Vendor":"GREE","Power":"{{pwr}}", "Mode":"{{states('climate.ac_receiver_livingroom')}}","FanSpeed":"Max","Temp":{{trigger.payload | int}}}

Thank you very much!! Can you explain what is trigger.payload and how it changing the temperature in the second automation?
Another problem: When I reset the home assistant, The UI of the climate configuration is reset too. Is there a way to save the last state?
In addition, I have a problem when I am using the remote of the AC it should send it to the transmitter and effect the AC but it doesn’t

It’s the Trigger State Object and represents the payload received by the MQTT Trigger.

Trigger State Object - MQTT Trigger

MQTT Trigger

Template variable Data
trigger.platform Hardcoded: mqtt .
trigger.topic Topic that received payload.
trigger.payload Payload.
trigger.payload_json Dictonary of the JSON parsed payload.
trigger.qos QOS of payload.

The climate component, climate.ac_receiver_livingroom, is configured to publish temperature changes to climate/temperature.

temperature_command_topic: climate/temperature

The automation, automation.convert_temperature, subscribes to climate/temperature and receives the temperature value via trigger.payload. It then proceeds to convert it, into the JSON format required by your physical thermostat, and publishes it to cmnd/AC_Receiver/IRhvac.

That’s expected behavior if the payload your thermostat publishes to tele/AC_Receiver/RESULT is not a retained message.

A retained message is stored by the MQTT Broker. When Home Assistant restarts and connects to the broker, it re-subscribes to tele/AC_Receiver/RESULT and receives the retained message. If the message is not retained, Home Assistant receives nothing.

You must configure your thermostat to publish its status (to tele/AC_Receiver/RESULT) as a retained message.

Sorry, I don’t know anything about your AC unit so I can’t help with you with that.

Thank you very much!!

I have a weird problem: the thermostat in the UI didn’t respond so I deleted him and now I can’t find the entity climate.AC_receiver_LivingRoom. I didn’t change nothing. The configuration file is the same.

When you say “deleted him” do you mean you deleted the Thermostat Card from the UI? That should not cause the climate entity to disappear from the Developer Tools > States page or from Configuration > Entities page.

All of Home Assistant’s entities are written in lowercase characters. Therefore it will presented like this:

climate.ac_receiver_livingroom

and not like this:

climate.AC_receiver_LivingRoom

The climate entity disappear from Developer Tools > States and from Configuration > Entities. That’s what I meant.

If it’s missing from those two pages then it means Home Assistant, on startup, was unable to create climate.ac_receiver_livingroom. It implies there may be something wrong with the climate entity’s configuration.

  • Check Configuration > Logs for any warning messages related to this climate entity.
  • Run Configuration > Server Controls > Check Configuration and see it reports any errors in the configuration.