Join GitHub today
Support binary_sensor and device_tracker in HomeKit. #13735
Map binary_sensor and device_tracker to HomeKit Binary Sensor, based on 'device_class' attributes:
If there is no any matched device_class, e.g. device_tracker, then default sensor type is OccupancySensor.
It's looking good so far. Unfortunately I can't test it until tomorrow evening (CET).
Since you dynamically assign the service and char, can you add tests to verify that the right ones where selected. You can get the service / char name with
char.display_name. Those must be equal to the HomeKit char / service constants.
referenced this pull request
Apr 9, 2018
Apr 9, 2018
@Yonsm great, thanks a lot! @cdce8p maybe its possible to add a default mapping to binary_sensors with device_class "opening" for all sensors which returns states like "open/tilted/closed"? something similar to the existing temperature sensors. with that change I don't need to create extra template binary_sensors anymore :)
If you want to suggest an enhancement please open a feature request in the Feature Requests section of our community forum.
Merged PRs should not be used for enhancement discussion or bug reports. If you've found a bug it's ok to make a review with inline comments and link to an issue that reports the bug.