1
0
mirror of https://github.com/home-assistant/core.git synced 2026-06-08 08:27:18 +01:00
Files
core/tests/components
timkoers 46b86f4a2f Add UniFi Uptime sensor (#40058)
* Added UniFi Uptime sensor

Added the UniFi uptime data as a sensor. Untested.

* Update sensor.py

Updated code as a result of the tests.

* Changed timestamp format and device class

Converted state to iso timestamp and changed device class to DEVICE_CLASS_TIMESTAMP.

* Updated unit of measurement to None

* Added import

* Update homeassistant/components/unifi/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Removed whitespace

* Added the uptime sensors option to the config flow

* All the unit tests should be there now

* Whoops

* Fixed translation

* Properly formatted the code

* Flake8 really has angel eyes

* Black should also be satisfied now

* Should have satisfied all static code analysis tools

* Fixed add uptime sensor function

* Fixed overintendation

* Fixed unit tests

* Made a spelling mistake during editing of unit tests

* Test verifies if utc time is correct

* Converted to iso format

* Converted unit test to iso format

* Unit test sensor json had the wrong uptime name

* Added options_updated handler

* Fixed remove sensors unit test

* Update homeassistant/components/unifi/sensor.py

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* Update homeassistant/components/unifi/sensor.py

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* Update test_device_tracker.py

Removed uptime from the devices

* Fixed black formatting issue

* I think the code coverage should be good now

* Trying to add the sensors again

* Using signals to hopefully trigger the controller to add them again

* Forgot import

* Sorted components

* fixed isort comments

* Removed CLASS and DEVICE_CLASS

* Added TYPE again

* Removed double underscores

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2020-09-18 19:33:37 +02:00
..
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-07-13 17:43:11 +02:00
2020-06-08 12:26:40 -07:00
2020-08-27 13:56:20 +02:00
2020-06-08 12:26:40 -07:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-06-08 12:26:40 -07:00
2020-08-27 13:56:20 +02:00
2020-08-28 15:33:08 +00:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-06-08 12:26:40 -07:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-09-15 22:38:45 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-06-08 12:26:40 -07:00
2020-06-08 12:26:40 -07:00
2020-07-22 20:21:32 -10:00
2020-06-08 12:26:40 -07:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-07-13 17:43:11 +02:00
2020-08-27 13:56:20 +02:00
2020-08-28 15:33:08 +00:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-06-08 12:26:40 -07:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-19 11:33:04 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-06-08 12:26:40 -07:00
2020-08-27 13:56:20 +02:00
2020-08-17 11:54:56 -05:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-07-13 17:43:11 +02:00
2020-06-08 12:26:40 -07:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-09-09 14:56:40 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-29 08:23:55 +02:00
2020-08-19 11:33:04 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-09-11 13:08:13 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-06-08 12:26:40 -07:00
2020-06-08 12:26:40 -07:00
2020-08-27 13:56:20 +02:00
2020-09-11 13:08:13 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-06-08 12:26:40 -07:00
2020-06-08 12:26:40 -07:00
2020-08-27 13:56:20 +02:00
2020-06-05 10:59:55 +02:00
2020-09-04 15:13:11 -05:00
2020-06-08 12:26:40 -07:00
2020-06-08 12:26:40 -07:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-06-08 12:26:40 -07:00
2020-09-03 12:22:00 -04:00
2020-08-19 14:57:38 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-06-29 09:39:24 -07:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-09-18 19:33:37 +02:00
2020-08-27 13:56:20 +02:00
2020-06-08 12:26:40 -07:00
2020-06-08 12:26:40 -07:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-06-08 12:26:40 -07:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-08-27 13:56:20 +02:00
2020-06-08 12:26:40 -07:00
2020-09-02 18:42:12 +02:00
2020-08-27 13:56:20 +02:00
2020-08-17 11:54:56 -05:00
2020-08-27 13:56:20 +02:00