Skip to content
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

Support multiple connected sensors in HA #122

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

infeeeee
Copy link
Collaborator

@infeeeee infeeeee commented Sep 21, 2024

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:

  • You can override any topic in entities.yaml, with state_topic_key, command_topic_key options.
  • You can have a list as override topic.
    • This is for HA-light, it needs both brightness_command_topic and command_topic. On command_topic HA only sends 0 as OFF payload, ON payload only sent on brightness_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...)

Copy link
Owner

@richibrics richibrics left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay

@infeeeee infeeeee merged commit 47c34d8 into richibrics:main Oct 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants