Skip to content

Commit

Permalink
Fix for tasmota lights
Browse files Browse the repository at this point in the history
Converts a float value into mandatory int value for the brightness.

Should fix diyhue#915 with reported detection and connection/pairing issues between apps and  diyhue bridge 

Perhaps it solves diyhue#941 too, because my OpenBeken light works with the modification.
  • Loading branch information
GerdZanker committed Dec 17, 2023
1 parent 83f3d73 commit 38475bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BridgeEmulator/lights/protocols/tasmota.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def get_light_state(light):
rgb = hex_to_rgb(hex)
state["xy"] = convert_rgb_xy(rgb[0],rgb[1],rgb[2])

state["bri"] = (int(light_data["Dimmer"]) / 100.0) * 254.0
state["bri"] = int(light_data["Dimmer"] / 100.0 * 254.0)
state["colormode"] = "xy"

return state

0 comments on commit 38475bd

Please sign in to comment.