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

Added separate sensor to pass along raw robotStatus property to HA #149

Merged
merged 1 commit into from
Oct 5, 2024

Conversation

joakimjalden
Copy link
Contributor

I added a separate sensor for the raw robotState of the robot vacuums.

It is based on feedback here and here. The issue is that the robotState is more expressive (e.g., returning or charging as part of a pitstop, to continue cleaning) than the states defined for the Vacuum Entity class in HA. By also exposing the robotState as a separate sensor for the device, one allows for more advanced automation possibilities.

I thought the added sensor was a cleaner option than expanding the Vacuum entity states with non-standard states for that entity class. I also opted to pass the numeric state along without trying to translate it to a string to keep implementation more straightforward and also (hopefully) allow, e.g., the new "Hygienic 700" robot vacuum to use the same code when eventually someone tries to use the get this into HA using the integration.

Copy link
Owner

@JohNan JohNan left a comment

Choose a reason for hiding this comment

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

Sounds like a good idea! Thanks!

@JohNan JohNan merged commit c56b3b7 into JohNan:main Oct 5, 2024
2 checks passed
@HonkStonk
Copy link

Very nice way of making it flexible for tinkerers and also keeping the HA format. Thanks! Will monitor it and try to use it.

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.

3 participants