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.
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.