Sendo A/C unit with Wifi Control (BroadLink_OEM-T1)

Okay, so here’s my configuration.
It’s not perfect as I said because the Thermostat Card assumes the climate device is turned on by selecting a mode and that also “off” is one of those modes. The Thermostat Card doesn’t support a separate on/off toggle like my air conditioner has. So I had to workaround that with automations. The MQTT Climate component also does not have a separate template mode for receiving the MQTT commands, it only has one for sending. So I had to use automations to get around that too.

Also, the internal temperature sensor isn’t exposed in this config so it will only show the temp from the climate device.

Anyway, Here we go.

# configuration.yaml
climate:
  - platform: mqtt
    name: Bedroom
    modes:
      - "auto"
      - "cool"
      - "heat"
      - "off"
    fan_modes:
      - auto
      - high
      - mid
      - low
    power_command_topic: "/aircon/<mac_address>/power/set"
    power_state_topic: "/aircon/<mac_address>/power/value"
    mode_command_topic: "temp/climate/hvac_mode_bedroom"
    mode_state_topic: "/aircon/<mac_address>/mode/value"
    mode_state_template: >-
      {% set values = { 'AUTO':'auto', 'HEATING':'heat',  'COOLING':'cool', 'OFF':'off' } %}
      {{ values[value] if value in values.keys() else 'OFF' }}
    temperature_command_topic: "/aircon/<mac_address>/temp/set"
    temperature_state_topic: "/aircon/<mac_address>/temp/value"
    fan_mode_command_topic: "/aircon/<mac_address>/fanspeed/set"
    fan_mode_state_topic: "/aircon/<mac_address>/fanspeed/set"
    min_temp: 16
    max_temp: 32
    temp_step: 0.5
    precision: 0.5
# Automations.yaml
- alias: hvac-mode-controller-bedroom
  trigger:
    platform: mqtt
    topic: temp/climate/hvac_mode_bedroom
  condition:
    condition: or
    conditions:
      - condition: template
        value_template: "{{ trigger.payload == 'auto' }}"
      - condition: template
        value_template: "{{ trigger.payload == 'heat' }}"
      - condition: template
        value_template: "{{ trigger.payload == 'cool' }}"
  action:
    - service: mqtt.publish
      data_template:
        topic: /aircon/<mac_address>/power/set
        payload: 'ON'
    - service: mqtt.publish
      data_template:
        topic: /aircon/<mac_address>/mode/set
        payload: >
          {% set values = { "auto":"AUTO", "heat":"HEATING", "cool":"COOLING", "off":"OFF" } %}
          {{ values[trigger.payload] if trigger.payload in values.keys() else "off" }}

- alias: hvac-mode-controller-bedroom-power
  trigger:
    platform: mqtt
    topic: temp/climate/hvac_mode_bedroom
    payload: 'off'
  action:
    - service: mqtt.publish
      data_template:
        topic: /aircon/<mac_address>/power/set
        payload: 'OFF'
    - service: climate.set_hvac_mode
      data:
        entity_id: climate.bedroom
        hvac_mode: 'off'

Here’s the look from the UI.
image

You’ll notice in the automations above, When selecting the mode, I have to send the power on command first, this is because my AC unit will not turn on just by switching modes.

Hope this makes sense to/helps someone.

2 Likes