Alexa Integration changes setting brightness with TP-Link bulbs (and others?)


(Dave Gutheinz) #1

The recent Alexa Integration updates (somewhere in the chain) has started sending brightness as a decimal value versus previous integer (10.0 vice 10). If a device handler/smart app does not convert this input to integer, it may cause the function to fail.
Example. In my TP-Link bulb device handlers, sending the 10.0 level is read as “0” by the device. One line change was (where ‘percentage’ is the input to the DH command)
percentage = percentage as int.
I probably should have thought of this originally.