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

feat(sensor): select sensor state in automations from list #54

Merged
merged 5 commits into from
Aug 20, 2023

Conversation

joostlek
Copy link
Contributor

@joostlek joostlek commented Aug 3, 2023

This way the possible options can be selected in the automation menu

custom_components/sleep_as_android/sensor.py Outdated Show resolved Hide resolved
custom_components/sleep_as_android/sensor.py Outdated Show resolved Hide resolved
custom_components/sleep_as_android/sensor.py Outdated Show resolved Hide resolved
@joostlek
Copy link
Contributor Author

joostlek commented Aug 5, 2023

Oh hey you're still there! I was trying to debug the 2023.8 issue but couldn't figure out how it worked. but I saw how the sensor was set up and I was thinking, if we're going to change this, let's at least try to make it clean with an ENUM sensor since I also remember the hassle of finding the right event to subscribe to in the automation

@IATkachenko
Copy link
Owner

My plan is to fix 2023.8 compatibility tomorrow.
Enum in states is a very good idea for this sensor: it have just fixed states.

@IATkachenko
Copy link
Owner

IATkachenko commented Aug 6, 2023

@joostlek, most of all changes is done in 2023.8 fix release.
Could you rebase PR to main branch and we will add it to v2.1.0 with skipping public v2.0.0

@joostlek
Copy link
Contributor Author

joostlek commented Aug 6, 2023

I can look at this later today

# Conflicts:
#	custom_components/sleep_as_android/sensor.py
@IATkachenko IATkachenko self-requested a review August 20, 2023 12:14
@IATkachenko IATkachenko changed the title Set device class to Enum feat[sensor]: select sensor state in automations from list Aug 20, 2023
@IATkachenko IATkachenko changed the title feat[sensor]: select sensor state in automations from list feat(sensor): select sensor state in automations from list Aug 20, 2023
@IATkachenko IATkachenko merged commit 4558ba8 into IATkachenko:main Aug 20, 2023
@IATkachenko
Copy link
Owner

Thanks!
Released as v2.1.0 -- will be beta for a week, and then I will change state to release.

@joostlek
Copy link
Contributor Author

Thank you! I'll also run the beta!

@joostlek joostlek deleted the main-1 branch August 22, 2023 21:56
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