MQTT Light Discovery (JSON Schema) - Pass current brightness when light toggled On

I am in the process of rolling my own ESP32-MQTT-based LED light controller, and have it configured to publish the discovery message. This is all working fine, and the dimmable light is discovered correctly by Home Assistant. I chose to use the JSON schema since it seemed to support the most features, but I am having an issue with the messages HA sends when toggling the light on and off. If the brightness doesn’t change, then only the state of On or Off is sent. If my ESP32 has rebooted, it doesn’t have a stored value for brightness, and HA assumes it knows the last brightness. Is there any way I can configure HA (through the discovery message) to always send the brightness value when toggling the light? It looks like this can be done with the Template schema, but I would like this to work with the JSON schema as well.

1 Like

Oh, this is exactly what I need. has anyone found a way to do this? :cry: