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

Add noise state for Livolo TI0001-illuminance #7727

Merged
merged 6 commits into from
Jul 6, 2024

Conversation

PaulVanSchayck
Copy link
Contributor

As already mentioned in PR #7707 , I was looking for a way to represent both the 4 different noise states the device reports, as well as a binary sensor when noise was detected.

Would this be an acceptable way? This works quite nicely for me.

exposes: [
e.noise_detected(),
e.illuminance().withUnit('%').withValueMin(0).withValueMax(100),
new Enum('noise_state', access.STATE, ['silent', 'normal', 'lively', 'noisy']).withDescription('Detected noise level'),
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
new Enum('noise_state', access.STATE, ['silent', 'normal', 'lively', 'noisy']).withDescription('Detected noise level'),
e.enum('noise_level', access.STATE, ['silent', 'normal', 'lively', 'noisy']).withDescription('Detected noise level'),

noise_level looks better I guess, also update the fromZigbee converter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. Fixed now

@Koenkk Koenkk merged commit 97a7c78 into Koenkk:master Jul 6, 2024
2 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Jul 6, 2024

Thanks!

@PaulVanSchayck PaulVanSchayck deleted the livolo-illu2 branch September 13, 2024 19:28
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