Add OccupancySensing PIR delay entities#669
Draft
TheJulianJES wants to merge 4 commits intozigpy:devfrom
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #669 +/- ##
=======================================
Coverage 97.44% 97.45%
=======================================
Files 62 62
Lines 10731 10752 +21
=======================================
+ Hits 10457 10478 +21
Misses 274 274 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DRAFT. TODO: Translations in HA!
Proposed change
This adds config number entities for the
OccupancySensingpir_o_to_u_delayandpir_u_to_o_delayattributes.The entity class for the Sonoff sensors (
ultrasonic_o_to_u_delay) is also moved to be near below the PIR delay classes.Additional information
This would avoid introducing quirks v2 entities, e.g. for the Hue sensors or the Frient sensor below:
IIRC there was an issue with Hue sensors returning this attribute was unsupported during pairing, but maybe that was only an issue because of the manufacturer code stuff we had going on. I'll need to recheck that.
Sonoff specific entity –
ultrasonic_o_to_u_delayIn the future, we may wanna look at exposing that entity for all devices, just with the limits removed.
All these entities will end up using the
BOXNumberModein HA anyway (where you can even enter numbers outside min/max IIRC), so these limits are more artificial.TODO: Also look at attributes in
SonoffPresenceSenorTimeout(device class + unit of measurement + unnecessary attributes).