Commit graph

247 commits

Author SHA1 Message Date
HomeAssistant Azure
d73d36d0cd [ci skip] Translation update 2020-10-08 00:06:03 +00:00
HomeAssistant Azure
486c0b644a [ci skip] Translation update 2020-10-07 00:06:20 +00:00
springstan
513f03eb1f
Return attribute dict directly without temporary variable v2 (#41271) 2020-10-06 16:55:16 +02:00
HomeAssistant Azure
bcfa4ac959 [ci skip] Translation update 2020-10-06 00:08:09 +00:00
HomeAssistant Azure
8d1d585b40 [ci skip] Translation update 2020-10-05 00:04:23 +00:00
HomeAssistant Azure
f8c2d877aa [ci skip] Translation update 2020-10-04 00:05:05 +00:00
springstan
c00915a6a7
Add ssl and verify_ssl to base strings for config flows (#40944)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-03 16:06:45 +02:00
HomeAssistant Azure
8d0f1e7db2 [ci skip] Translation update 2020-09-30 00:04:43 +00:00
HomeAssistant Azure
e9e17122e7 [ci skip] Translation update 2020-09-28 00:03:28 +00:00
HomeAssistant Azure
c3afe39ea0 [ci skip] Translation update 2020-09-26 00:05:34 +00:00
HomeAssistant Azure
c30982c981 [ci skip] Translation update 2020-09-25 00:04:29 +00:00
HomeAssistant Azure
c77c0e4780 [ci skip] Translation update 2020-09-24 00:05:22 +00:00
HomeAssistant Azure
7c344fa0cd [ci skip] Translation update 2020-09-22 00:07:08 +00:00
HomeAssistant Azure
587e3f1eb2 [ci skip] Translation update 2020-09-21 00:02:47 +00:00
HomeAssistant Azure
62c4e072f5 [ci skip] Translation update 2020-09-19 00:07:12 +00:00
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
HomeAssistant Azure
0a0a8fc67d [ci skip] Translation update 2020-09-18 00:07:17 +00:00
HomeAssistant Azure
f28b7f2187 [ci skip] Translation update 2020-09-16 00:09:01 +00:00
HomeAssistant Azure
d0f4b23063 [ci skip] Translation update 2020-09-15 00:09:18 +00:00
HomeAssistant Azure
07d5af1969 [ci skip] Translation update 2020-09-08 00:04:13 +00:00
HomeAssistant Azure
65b227126d [ci skip] Translation update 2020-09-03 00:06:16 +00:00
HomeAssistant Azure
904f5c4346 [ci skip] Translation update 2020-08-30 00:03:17 +00:00
Ville Skyttä
b4bac0f7a0
Exception chaining and wrapping improvements (#39320)
* Remove unnecessary exception re-wraps

* Preserve exception chains on re-raise

We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.

The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.

Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.

* Fix mistaken re-wrap in homematicip_cloud/hap.py

Missed the difference between HmipConnectionError and
HmipcConnectionError.

* Do not hide original error on plex new cert validation error

Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
2020-08-28 13:50:32 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
HomeAssistant Azure
195d4b6897 [ci skip] Translation update 2020-08-27 00:04:55 +00:00
HomeAssistant Azure
e76db60367 [ci skip] Translation update 2020-08-05 00:02:19 +00:00
HomeAssistant Azure
8abdc2c969 [ci skip] Translation update 2020-07-27 00:02:58 +00:00
HomeAssistant Azure
9092b83869 [ci skip] Translation update 2020-07-20 00:03:01 +00:00
Robert Svensson
6826a8829c
UniFi - Handle session expiration (#37782) 2020-07-12 09:47:26 +02:00
HomeAssistant Azure
251a1d6619 [ci skip] Translation update 2020-07-09 00:05:04 +00:00
J. Nick Koston
f352c51990
Improve unifi device tracker performance (#37308)
* Improve unifi device tracker performance

The unifi websocket sends an update every second
which generates a significant amount of state
changed updates.

Avoid creating callback functions when they
are not going to be used.

* make _no_heartbeat/_make_disconnected instance methods

* remove extra empty line

* revert is_wired change

* remove extra line
2020-07-02 17:46:37 -05:00
HomeAssistant Azure
e39997ca10 [ci skip] Translation update 2020-06-23 00:09:06 +00:00
Robert Svensson
3a83f4bdbe
Support guest events in UniFi device tracker (#37008) 2020-06-22 21:50:34 +02:00
HomeAssistant Azure
3bf389639b [ci skip] Translation update 2020-06-07 00:03:28 +00:00
HomeAssistant Azure
492874c4a0 [ci skip] Translation update 2020-06-06 00:03:33 +00:00
Robert Svensson
a3865fb383
UniFi - Increase time to mark UniFi devices as away (#36366) 2020-06-02 10:35:27 +02:00
HomeAssistant Azure
5920f3379c [ci skip] Translation update 2020-05-31 00:02:42 +00:00
HomeAssistant Azure
f4a518edcc [ci skip] Translation update 2020-05-30 00:03:23 +00:00
HomeAssistant Azure
564fb1d1e5 [ci skip] Translation update 2020-05-29 00:04:16 +00:00
HomeAssistant Azure
d4f3bb8ce0 [ci skip] Translation update 2020-05-25 00:02:49 +00:00
HomeAssistant Azure
c10aa13d0b [ci skip] Translation update 2020-05-20 00:03:49 +00:00
Robert Svensson
648df6d984
UniFi - Fix disabled entities being enabled after a restart (#35819)
* Async remove call removed too much, resulting in disabled entities coming back after a restart

* Calling super().async_remove is no longer needed, changed to self.async_remove

* Yes, they should be sets...
2020-05-19 23:57:41 +02:00
HomeAssistant Azure
e94f44f294 [ci skip] Translation update 2020-05-17 00:02:56 +00:00
HomeAssistant Azure
f3bb370b3a [ci skip] Translation update 2020-05-16 00:03:50 +00:00
Robert Svensson
064321c21e
UniFi - Remove unused string definition, pointed out by Bram (#35678) 2020-05-15 23:43:00 +02:00
HomeAssistant Azure
9586e9ebef [ci skip] Translation update 2020-05-15 00:02:56 +00:00
Paulus Schoutsen
0efeefe3b2 Update translations 2020-05-13 11:27:21 -07:00
Robert Svensson
785b8d2bd1
UniFi - Sites don't declare role on UniFiOS 1.7.0 beta (#35555)
* New way to identify role, compatible with standalone controller or as part of unifios

* Remove error

* Bump dependency to v22

* Remove unused import
2020-05-13 00:37:16 +02:00
Robert Svensson
c71b6c8a71
UniFi - Update device registry after device has been upgraded (#35430)
* Update device registry if received event saying device has been updated

* Make sure event was the last updated
2020-05-10 17:14:45 +02:00
Robert Svensson
2f5c4b81ba
UniFi - Use more common strings for config flow (#35399)
* Use more common strings for config flow

* Remove unused strings
2020-05-09 22:22:53 +02:00