Hi
I’m experiencing strange behaviour for MQTT lights I configured in H.A.
I updated everything today, nothing changes : after a restart, the MQTT lights are “inactive” in lovelace UI, and sending a “turn_on” service call with brightness value does nothing at all. or more specifically : id DOES send brightness command payload over mqtt, but the light entity in home assistant remains “inactive”.
If I go to developpers tab and look for the light’s state, this is what is returned :
supported_color_modes:
- brightness
friendly_name: Chauffage Jade
supported_features: 0
I’m sending service actions in Lovelace with a custom:state-switch card, and more specifically :
- icon: mdi:leaf
tap_action:
action: call-service
service: light.turn_on
service_data:
brightness: 64
entity_id: light.chauffage_jade
entity: sensor.etat_chauffage_chambre_jade
layout: icon
state_styles:
eco:
icon:
color: '#66bb6a'
^^ this does NOT activate the light whereas …
- icon: mdi:weather-sunny
tap_action:
action: call-service
service: light.turn_on
service_data:
brightness: 255
entity_id: light.chauffage_jade
entity: sensor.etat_chauffage_chambre_jade
layout: icon
state_styles:
confort:
icon:
color: '#FFC107'
^^ this DOES activate the light and then it works as expected and shows this state, with a brightness element :
supported_color_modes:
- brightness
color_mode: brightness
brightness: 64
friendly_name: Chauffage chambre jade
supported_features: 0
here is a relevant config (I have 2, they behave the same) , I’ve tried several things with/without availability_topic (and published “retained” payload), if anyone has a clue please ? Am I missing something in the docs ? (I’m trying to control a Qubino flush pilot controled by a openhab zwave installation, as long as I cannot find time to migrate everything from openhab and that zwavejs-to-mqtt does not recognize the qubino properly):
light:
- platform: mqtt
name: "Chauffage Bureau A"
command_topic: "chauffages/bureauA/switch"
state_topic: "chauffages/bureauA/status"
state_value_template: >
{% if value == 'ON' %}
ON
{% else %}
OFF
{% endif %}
brightness_state_topic: 'chauffages/bureauA/OHoutbound'
brightness_command_topic: "chauffages/bureauA/OHinbound"
brightness_scale: 100
on_command_type: "brightness"
retain: true
payload_on: "ON"
payload_off: "ECO"
availability_topic: "chauffages/always_available"
payload_available: "1"
payload_not_available: "0"