Light entities reporting 1% brightness

I thought this might be a one-off issue but it’s happened now with multiple smart bulbs. Whenever I view the light entity in HA its brightness shows as 1%. If I update it to any value, then it will work but the display/value will go back to 1% almost immediately.

I’ve had this issue with a BW-LT21 connected via Tuya, once again when flashed via Tasmota, and again when flashed with ESPHome. Now I have it with two new Athom lights via ESPHome. The only light I never had this problem on was a bluetooth mesh light connected through Alexa.

image
image

I can confirm with the Athom lights at least that their state in the logs are showing as 100% brightness being sent back to HA. They are rgbct lights if it makes a difference.

image

My theory is that it’s reporting the brightness back as something HA can’t parse and changes it to 1, or HA is reading it from 0-1 instead. Is there anyway to fix this? I’d like for the reported brightness % in HA to be accurate.

I think I’m boiling it down to an issue with ESP based lights regardless of firmware (Tuya standard, Tasmota and ESPHome) and their HA API’s. Ended up putting in an MQTT connection in the ESPHome yaml, removing the home-assistant API and now it finally displays/reports correctly as it is now ESPHome → MQTT → HA.