Commit Graph

2 Commits

Author SHA1 Message Date
Darell Tan
4eac1ba2a9 Fix access check for light expose features
Some dimmers expose features with state|set instead of state|get|set.
Relax the check to cater for more light/dimmers.
2023-08-05 02:17:06 +08:00
Darell Tan
c61da984c9 Add support for dimmers and dimmable bulbs
The exposes entry looks similar to a switch, except the type is a
"light" and it has `state` and `brightness`. Tested only on single
channel dimmers.

Also added a PercentageTranslator to translate between the HomeKit
`brightness`, which is a percentage, to/from an arbitrary numeric value
in Z2M.
2023-06-25 02:20:01 +08:00