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 summary sensor #64

Merged
merged 5 commits into from
Sep 14, 2023
Merged

added summary sensor #64

merged 5 commits into from
Sep 14, 2023

Conversation

PhilippMundhenk
Copy link
Contributor

@PhilippMundhenk PhilippMundhenk commented Aug 19, 2023

as discussed in #29 (though much smaller scope)

Summary sensors are possible in Home Assistant, but flexible groups with wildcards require additional custom components, or significant templating. A simple sensor that automatically considers all uptime kuma instances without additional configuration is helpful.

Implementation is simple enough, but yes, maintenance might be required in future. I will support if I can, but I leave the decision to integrate this to @meichthys.

@meichthys
Copy link
Owner

Thanks @PhilippMundhenk
I will take a look at this soon 👍

@PhilippMundhenk
Copy link
Contributor Author

PhilippMundhenk commented Aug 20, 2023

Take your time! I have to admit it is not the nicest code I have ever written, but it does the job.

I did find a bit more time and also added the attributes suggested in #29, might actually be helpful:
grafik

Not sure if I am handling the HA entity management correctly though. My first time working on a custom component. If you have the time, some extra scrutiny would be appreciated, esp. around sensor setup, naming, etc.

@PhilippMundhenk PhilippMundhenk marked this pull request as draft August 20, 2023 13:09
@PhilippMundhenk
Copy link
Contributor Author

Marking this as draft, will have to fix the sensor naming: Currently, only a single UK instance can be configured, as hard-coded sensor naming of sensor.uptimekuma clashes...

@PhilippMundhenk PhilippMundhenk marked this pull request as ready for review August 20, 2023 13:45
@meichthys
Copy link
Owner

LGTM 👍
Any reason why the _INFO dictionaries include a decimal 0? It seems like the decimal will never change?

@meichthys meichthys merged commit bf66b04 into meichthys:main Sep 14, 2023
2 checks passed
@alexdelprete
Copy link
Contributor

This functionality is great. Thank you for implementing it.

@PhilippMundhenk
Copy link
Contributor Author

LGTM 👍
Any reason why the _INFO dictionaries include a decimal 0? It seems like the decimal will never change?

I think I just copy & paated the existing infos. Tried to keep the same style. No reason from my side.

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