Light switches through 1/0 instead ON/OFF

I ended up using the default template and using MQTT demultiplexers with automations to create the various state and command topics as individual topics, then my yaml looked like below:

you could adopt this approach for hs, i used the xy values from tasmota (although it needed some mapping in the automation demultiplexer and command topic. (see MQTT demultiplexer automatic sensor discovery for tasmota2zigbee for examples of how to do create new topics and automations)

#Aurora AOne Zigbee Light 1
  - platform: "mqtt"
    unique_id: zigbee_aone_light_default
    name: "Aurora AOne"
    on_command_type: first
    availability: 
      topic: "sensor/AOne/availability"
      payload_available: True
      payload_not_available: False
    state_topic: "sensor/AOne/power"
    state_value_template: '{{ value_json["AOne"]["Power"] }}'
    payload_on: 1
    payload_off: 0
    command_topic: "cmnd/AOne/power"
    brightness_scale: 254
    brightness_state_topic: "sensor/AOne/brightness"
    brightness_value_template: '{{ value_json["AOne"]["Dimmer"] }}'
    brightness_command_topic: "cmnd/AOne/brightness"
    xy_state_topic: "sensor/AOne/xy"
    xy_value_template: '{{ value_json["AOne"]["XY"] }}'
    xy_command_topic: "cmnd/AOne/xy"
    color_temp_state_topic: "sensor/AOne/colortemp"
    color_temp_value_template: '{{ value_json["AOne"]["CT"] }}'
    color_temp_command_topic: "cmnd/AOne/colortemp"
    max_mireds: 370
    min_mireds: 153
    qos: 0
    optimistic: false
    retain: false
    json_attributes_topic: "tele/tasmota/AOne/SENSOR"
    json_attributes_template: "{{ value_json.AOne | tojson }}"

Note i opted to use device friendly names my topics

1 Like