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 UniFi Uptime sensor #40058
Add UniFi Uptime sensor #40058
Conversation
Added the UniFi uptime data as a sensor. Untested.
Updated code as a result of the tests.
You should put this in draft state until it is ready for review |
Converted state to iso timestamp and changed device class to DEVICE_CLASS_TIMESTAMP.
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Other things expected prior to approval: |
If it's a single sensor the enabling/disabling can be done via the standard entity options already. |
It's per client so potentially a lot of entities |
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
Removed uptime from the devices
@MartinHjelmare and @Kane610 I think everything should be fixed now! |
Nearly there! Smaller things left. Please also add a test to comply with the coverage comment; verify that the same client gets added twice |
I've added the test that covers the uncovered line, including homeassistant/components/unifi/sensor.py#L58. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Code owner should approve before merge.
Docs should be updated: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good, all of them have been fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Good job
Added the UniFi uptime data as a sensor. Untested.
Proposed change
New sensor feature, the UniFi Uptime time.
Type of change
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: