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: battery level and state sensors #4

Closed
wants to merge 1 commit into from
Closed

feat: battery level and state sensors #4

wants to merge 1 commit into from

Conversation

Rocka84
Copy link
Contributor

@Rocka84 Rocka84 commented Feb 9, 2022

This is a quick and dirty implementation of two new sensors for the state and level of my laptop battery.

I didn't add any config options, I hope this is okay for now. Maybe you could add those? Or guide me to it?

@muniter
Copy link
Owner

muniter commented Feb 10, 2022

Hello, Thank you for your contribution. The code looks good!

So far as you've seen all sensors are enabled by default. So there's no need for config options to work. But in this case is the kind of sensor I would like to be able to disable. I use it on a desktop so don't have a battery and don't want the sensor in HA, and from the code I can see It would just report it as discharging perhaps?.

So I might work soon on the logic of enabling and disabling sensors, and merge this two new sensors! Thanks again!

@muniter
Copy link
Owner

muniter commented Mar 23, 2022

Hey @Rocka84 thank you for your contribution. I have added your changes in 792b16c went ahead and made a few changes. And now is also posible to disable sensors in the config. So desktop users don't have any problems.

@muniter muniter closed this Mar 23, 2022
@Rocka84
Copy link
Contributor Author

Rocka84 commented Mar 23, 2022

Nice 👍

Copy link

sonarcloud bot commented Nov 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

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