upsert / lutron-caseta-pro

Custom Home Assistant Component for Lutron Caseta Smart Bridge PRO / RA2 Select
Apache License 2.0
184 stars 38 forks source link

Return light brightness as int #8

Closed marthoc closed 6 years ago

marthoc commented 6 years ago

The math in the brightness property method was causing a float to be returned, which for me was causing an issue with the new HomeKit component, which checks to make sure that brightness is an int before passing it to HomeKit. This would probably also cause a problem with any other parts of HA that required brightness to be an int. This fix just coerces the result of the brightness math to int to ensure that an int is returned.