Go to file
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
.devcontainer Fixes invalid JSON syntax in devcontainer (#29911) 2019-12-13 12:41:56 +01:00
.github Activate hassfest requirements CI check (#39940) 2020-09-11 21:38:32 +02:00
.vscode Constraints pt3 (#37803) 2020-07-13 15:55:20 +02:00
docs Improve string formatting v5 (#33697) 2020-04-05 17:48:55 +02:00
homeassistant Add UniFi Uptime sensor (#40058) 2020-09-18 19:33:37 +02:00
rootfs Disable jemalloc via specific ENV variable, see Issue#36237 (#36274) 2020-06-03 01:08:50 +02:00
script Activate hassfest requirements CI check (#39940) 2020-09-11 21:38:32 +02:00
tests Add UniFi Uptime sensor (#40058) 2020-09-18 19:33:37 +02:00
.coveragerc Add config support to zoneminder integration (#37060) 2020-09-16 22:58:51 -07:00
.dockerignore Integrate dockerbuild (#33168) 2020-03-23 00:39:37 +01:00
.gitattributes highlight Dockerfile.dev as Dockerfile in github ui (#36933) 2020-06-22 14:45:57 +02:00
.gitignore Add .env file to .gitignore for vscode environment settings (#35200) 2020-05-17 15:17:05 +02:00
.hadolint.yaml Add hadolint to CI (#34758) 2020-04-27 12:09:31 +02:00
.ignore Include .ignore file for search utilities (#5290) 2017-01-16 22:52:53 -08:00
.pre-commit-config.yaml Upgrade isort to 5.5.2 (#39879) 2020-09-10 08:34:15 +02:00
.prettierignore Rename translations dir for integrations (#34494) 2020-04-21 16:11:05 -07:00
.readthedocs.yml Drop Python 3.6 support (#29978) 2019-12-16 07:29:19 +01:00
.travis.yml Upgrade pylint to 2.6.0 (#39363) 2020-08-29 07:59:24 +02:00
.yamllint Add yamllint (in pre-commit and CI) (#33676) 2020-04-05 10:33:45 +02:00
CLA.md Update LICENSE.md and CLA.md to reflect the new Apache 2.0 license 2017-01-28 12:12:34 -08:00
CODEOWNERS Add cgtobi to kodi code owners (#40202) 2020-09-17 20:17:22 -05:00
CODE_OF_CONDUCT.md Update Code of Conduct to 2.0 (#36142) 2020-05-25 19:40:40 -04:00
CONTRIBUTING.md Contributing: Add note about feature suggestions and bug tracking (#30225) 2019-12-30 17:54:16 +01:00
Dockerfile Block typing from being installed (#37707) 2020-08-26 14:51:41 +02:00
Dockerfile.dev Fix Dockerfile.dev for VS Code devcontainer (#37801) 2020-07-12 16:18:08 -07:00
LICENSE.md Update license to official GitHub template (#16470) 2018-09-07 10:11:51 +02:00
MANIFEST.in Consolidate frontend (#9915) 2017-10-24 19:36:27 -07:00
README.rst Adjusts repository README (#29805) 2019-12-10 09:22:37 +01:00
azure-pipelines-ci.yml Block typing from being installed (#37707) 2020-08-26 14:51:41 +02:00
azure-pipelines-release.yml Integrate dockerbuild (#33168) 2020-03-23 00:39:37 +01:00
azure-pipelines-translation.yml Migrate translations upload (#33926) 2020-04-09 17:52:33 -07:00
azure-pipelines-wheels.yml Update azure-pipelines-wheels.yml 2020-09-13 15:38:02 +02:00
build.json Update docker base image to 8.4.0 (#40066) 2020-09-14 14:50:39 +02:00
codecov.yml Update Codecov.io configuration (#33783) 2020-04-07 09:01:01 -07:00
pylintrc Upgrade pylint to 2.6.0 (#39363) 2020-08-29 07:59:24 +02:00
pyproject.toml Drop Python 3.6 support (#29978) 2019-12-16 07:29:19 +01:00
requirements.txt Updated certifi to > 2020.6.20 (#39160) 2020-08-27 12:45:17 +02:00
requirements_all.txt Updated frontend to 20200918.0 (#40253) 2020-09-18 19:12:10 +02:00
requirements_docs.txt Refactor API documentation (#33217) 2020-03-25 13:21:04 -07:00
requirements_test.txt Upgrade pytest-xdist to 2.1.0 (#40057) 2020-09-15 16:28:51 +02:00
requirements_test_all.txt Updated frontend to 20200918.0 (#40253) 2020-09-18 19:12:10 +02:00
requirements_test_pre_commit.txt Upgrade isort to 5.5.2 (#39879) 2020-09-10 08:34:15 +02:00
setup.cfg Upgrade isort to 5.4.2 (#37939) 2020-08-29 08:23:55 +02:00
setup.py Updated certifi to > 2020.6.20 (#39160) 2020-08-27 12:45:17 +02:00
tox.ini Skip install on tox pylint (#39260) 2020-08-27 16:57:58 +02:00

README.rst

Home Assistant |Chat Status|
=================================================================================

Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.

Check out `home-assistant.io <https://home-assistant.io>`__ for `a
demo <https://home-assistant.io/demo/>`__, `installation instructions <https://home-assistant.io/getting-started/>`__,
`tutorials <https://home-assistant.io/getting-started/automation-2/>`__ and `documentation <https://home-assistant.io/docs/>`__.

|screenshot-states|

Featured integrations
---------------------

|screenshot-components|

The system is built using a modular approach so support for other devices or actions can be implemented easily. See also the `section on architecture <https://developers.home-assistant.io/docs/en/architecture_index.html>`__ and the `section on creating your own
components <https://developers.home-assistant.io/docs/en/creating_component_index.html>`__.

If you run into issues while using Home Assistant or during development
of a component, check the `Home Assistant help section <https://home-assistant.io/help/>`__ of our website for further help and information.

.. |Chat Status| image:: https://img.shields.io/discord/330944238910963714.svg
   :target: https://discord.gg/c5DvZ4e
.. |screenshot-states| image:: https://raw.github.com/home-assistant/home-assistant/master/docs/screenshots.png
   :target: https://home-assistant.io/demo/
.. |screenshot-components| image:: https://raw.github.com/home-assistant/home-assistant/dev/docs/screenshot-components.png
   :target: https://home-assistant.io/integrations/