-
-
Notifications
You must be signed in to change notification settings - Fork 28.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add observed entities to bayesian sensor #27721
Conversation
@paolog89 This change would be really useful to me, thanks! Checking your code though I think it will duplicate entity ids that are relevant for multiple observations. You might want to create a unique set. |
@sophof Thanks for your feedback. Isn't that also a feature? This way you can see if you have multiple observations. |
I guess so, but won't it be impossible to differentiate them anyway if an entity trigger multiple observations? I worry that especially with libera l use of templates (I'm working on an update that enhances templates) it'll get very spammy... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests need to pass but looks good
Thanks! Do I need to do something? |
…ry_sensor.py to verify the entity_id
We don't make changes to the backend based on a display issue in the frontend. You're also removing an existing attribute and replace the content with something else, that does not match the name. |
Hello Paulus, would it be ok to add an attribute with the observed entities? how would you solve the fronted issue? |
Yes a new attribute is fine. Open an issue on the frontend repo |
There is an issue on the frontend repo Can you re-open this pull request or should I open a new one? |
Done and done. |
…ional attribute for observed entities
Codecov Report
@@ Coverage Diff @@
## dev #27721 +/- ##
==========================================
+ Coverage 94.41% 94.64% +0.22%
==========================================
Files 626 756 +130
Lines 47140 54840 +7700
==========================================
+ Hits 44506 51901 +7395
- Misses 2634 2939 +305
Continue to review full report at Codecov.
|
You need to sort the output in your tests. Sets are not sorted. |
Description:
The Bayesian binary sensor currently shows only a list of [object Object] under the field observations:
This change will include the list of entities that have been observed:
Related issue (if applicable): N/A
Pull request with documentation for home-assistant.io (if applicable): N/A
Example entry for
configuration.yaml
(if applicable): N/AChecklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest
.requirements_all.txt
by runningpython3 -m script.gen_requirements_all
..coveragerc
.If the code does not interact with devices: