Support multiple connected sensors in HA#122
Merged
infeeeee merged 1 commit intorichibrics:mainfrom Oct 29, 2024
Merged
Conversation
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.
Multiple connected sensor related changes from #96
I separated from there, because this is also needed for brightness as light, lights need custom topics for state and brightness.
A working implementation of brightness as light is on my branch brightness-light. Compare with this branch #124
Difference from #96:
entities.yaml, withstate_topic_key,command_topic_keyoptions.brightness_command_topicandcommand_topic. Oncommand_topicHA only sends 0 as OFF payload, ON payload only sent onbrightness_command_topic. The problem with this, after callback, it would send the same callback value to both connected sensors. I solved it by sending through valueformatter, so we can filter and modify the wrong values. To understand this better, see the Brightness as HA light #124 , I will document this somewhere. (I also started rewriting valueformatter to make this more easier...)