Commit Graph

28848 Commits (b155d2bbe59ebe81fdba0750e3e4a5dccceef502)

Author SHA1 Message Date
Paulus Schoutsen 6d0da631bf
Handle prepare timeout in websocket API (#55989) 2021-10-08 22:12:06 -07:00
GitHub Action d55a7e5cc7 [ci skip] Translation update 2021-10-09 00:11:46 +00:00
Clifford Roche 204b901464
Bump greeclimate to 0.11.9 (#57358) 2021-10-08 18:08:52 -06:00
Shay Levy 722d3862db
Fix Shelly RGB/W supported color mode detection (#57359) 2021-10-09 02:22:14 +03:00
Aaron Bach fe3b5e8804
Use current config entry standards for SimpliSafe (#57141)
* Use current config entry standards for SimpliSafe

* Include tests
2021-10-08 14:22:29 -05:00
Aaron Bach 4104a3dee6
Use built-in logic for options handler in AirVisual (#57131) 2021-10-08 14:20:57 -05:00
MatthewFlamm fb063928ce
Add device info to nws (#57153)
* Add base entity

* Use function for device_info

Multiple inheritance makes this tricky with a base class

* Device info in sensor

* Device info weather

* parantheses

* isort
2021-10-08 14:15:45 -05:00
Aaron Bach 0364405595
Reorganize RainMachine services (#57145)
* Reorganize RainMachine services

* Code review

* Ensure integration services aren't tied to a particular config entry

* Cleanup

* linting

* Code review

* Code review

* Code review

* Code review
2021-10-08 20:03:47 +02:00
Paulus Schoutsen eba1d7d16a
Guard for bad last reset (#57344) 2021-10-08 10:48:52 -07:00
Erik Montnemery 7e34860615
Improve state of cover groups (#57313)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-10-08 09:52:58 -07:00
David Boslee 7f966613bd
Disconnect websockets after token is revoked (#57091)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-10-08 09:38:22 -07:00
starkillerOG 830e2bc47a
Netgear fix port and device model beeing overwritten (#57277)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-08 09:03:21 -07:00
Milan Meulemans 4dafd42154
Fix Nanoleaf light turn_off transition (#57305) 2021-10-08 09:02:01 -07:00
Milan Meulemans c04be4f5d0
Upgrade aionanoleaf to 0.0.3 to fix deadlock (#57312) 2021-10-08 08:59:19 -07:00
J. Nick Koston e77fae56d9
Migrate tplink hosts that were previously imported from yaml (#57308) 2021-10-08 08:58:18 -07:00
Steven Looman ba83433c64
Fix multiple upnp/ssdp issues (#57314) 2021-10-08 08:57:49 -07:00
Franck Nijhof 82160fa350
Add config flow to Stookalert (#57119) 2021-10-08 11:34:22 +02:00
Yuval Aboulafia db7d2de8bc
Use _attr in 17track (#57187)
* use _attr

* fix name

* attributes

* set fixed attr before init

* access parameters directly
2021-10-08 10:03:09 +03:00
Allen Porter 7d4dd94da8
Add WebSocket API for intiting a WebRTC stream (#57034)
* Add WebSocket API for intiting a WebRTC stream

See https://github.com/home-assistant/architecture/discussions/640

* Increase test coverage for webrtc camera stream

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-10-07 22:13:14 -07:00
J. Nick Koston 56d6173d70
Recreate the powerwall session/object when attempting relogin (#56935) 2021-10-07 20:15:29 -07:00
Teemu R 8fb0da7720
Stopgap fix for inconsistent upstream API of tplink dimmers (#57285) 2021-10-07 20:15:13 -07:00
J. Nick Koston ddab7f3024
Bump HAP-python to 4.30 (#57284) 2021-10-07 20:06:27 -07:00
J. Nick Koston 49e6f84b1c
Bump yeelight to 0.7.7 (#57290) 2021-10-07 14:48:08 -10:00
GitHub Action 01d883d7c9 [ci skip] Translation update 2021-10-08 00:13:12 +00:00
Teemu R 36a22400e5
Fix transition handling for tplink lights (#57272)
* Fix transition handling for tplink light

* Apply suggestions from code review

* Test that all transitions are passed correctly

* Fix linting

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-10-08 00:20:26 +02:00
starkillerOG cd1a71b070
Motion_blinds fix up button not available for unidirection blinds (#57266) 2021-10-07 13:27:48 -07:00
Erik Montnemery be61009030
Correct SQL query generated by get_metadata_with_session (#57225)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-10-07 13:23:23 -07:00
Raman Gupta 3476b430db
Convert val to str when needed while calling zwave_js.set_value (#57216) 2021-10-07 13:22:33 -07:00
Bram Kragten 33b8130002
Update frontend to 20211007.0 (#57268) 2021-10-07 13:18:12 -07:00
J. Nick Koston ac3741df41
Fix RGB only (no color temp) devices with tplink (#57267) 2021-10-07 10:14:14 -10:00
Michael Chisholm 667e730946
Improve dlna_dmr code quality (#56886)
* Listen for config updates from DlnaDmrEntity.async_added_to_hass

Use `Entity.async_on_remove` for dealing with callback cancellation,
instead of re-inventing the wheel with `_remove_ssdp_callbacks`.

* Use async_write_ha_state within async methods

* Import YAML config from async_setup_platform

* Import flow prompts user when device is uncontactable during migration

When config flow is able to contact a device, or when it has information
from SSDP, it will create config entries without error. If the device is
uncontactable at this point then it will appear as unavailable in HA
until it is turned on again.

When import flow cannot migrate an entry because it needs to contact the
device and can't, it will notify the user with a config flow form.

* Don't del unused parameters, HA pylint doesn't care

* Remove unused imports from tests

* Abort config flow at earliest opportunity

* Return async_abort instead of raising AbortFlow

* Consolidate config entry test cleanup into a single function

* fixup! Consolidate config entry test cleanup into a single function

Revert "Consolidate config entry test cleanup into a single function"

This reverts commit 8220da7263.

* Check resource acquisition/release in specific tests

* fixup! Check resource acquisition/release in specific tests

* Remove unused network dependency from manifest

* _on_event runs in async context

* Call async_write_ha_state directly (not via shedule_update)

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 22:14:00 +02:00
Aaron Bach b980dc7e33
Use current config entry standards for Ambient PWS (#57133) 2021-10-07 22:19:03 +03:00
Franck Nijhof f142d0a945
Upgrade ambee to 0.4.0 (#57264) 2021-10-07 21:11:38 +02:00
Kevin Hellemun dc5e4392ae
Refactor Xiaomi vacuum to sensors (#54990)
* Refactor Xiaomi vacuum with sensors.

This is the first step into refactoring xiaomi vacuum attributes into sensors.
What is missing are some switches and binary sensors etc.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Use generic sensor for Xiaomi vacuum sensors.

By using HA coordinator, the generic Xiaomi sensor class can be used with these
coordinators to get the status sensors from vacuum. This also means now that
sensors are available as soon as HA starts, which is a nice plus.

Now the only reason to create a subclass of the generic sensors is when custom
value parsing needs to be done.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Working vacuum sensors via 1 coordinator.

Vacuum needs a custom coordinator to ensure that it fetches all the needed data
and puts it in a dict. From this dict the sensors will then get their data
accordingly.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Remove vacuum setup method in sensor

Sensor is generic enough that vacuum does not require its own setup method.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Don't auto register generic sensors.

Let the user decide which sensor is useful for them and enable them.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Remove converted attributes from xiaomi vacuum.

The attributes that have been converted so far should be removed from the vacuum
attributes list.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Fetch data from vacuum sequentially.

It seems some vacuums do not like parallel requests. The requests that came
before are ignored.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Refactor vacuum sensors to its own container.

By moving vacuum sensors to its own container, there is no more key collisions.
This in turns means that there is need for the split hack to ensure key names
are correct.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* fixup! fix bad rebase.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Fix sensor naming and default registration.

Use proper names for sensors, no need to include from which device status it
came.

Registration of the sensor by default has been parameterised. If the param is
not set, the sensor is not registered.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Make vacuum platform also use coordinator for its data.

By using the coordinator for data in vacuum platfrom, removes the cases where
request gets ignored during the case where the requests are done concurrently by
separate platforms.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Add binary sensor for vacuum

Add binary sensor for waterbox, mop, and water shortage.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Added proper icons to sensors.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Refactor sensors to use dataclass.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Make vacuum use coordinator for its data.

This commit also insures that the binary sensors are only registered for devices
that include a mop.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Apply suggestions from code review

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

* Minor refactoring

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Update data from coordinator after running command.

This is is to have a faster status change when executing a command like changing
fan speeds. If a manual refresh is not triggered. Worst case scenario it will
take 10s for the new fan speed to be reported in HA.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Refresh within coroutine is ok.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Move logging to _handle_coordinator_update

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Use internal state attribute.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Fix vacuum typing

* Fix tests constants

* Fix vacuum inconsistent return values

* Fix vacuum state update

* Fix vacuum tests

* Remove impossible cases

* Parametrize custom services test

* Move goto test

* Move clean segment test

* Move clean single segment test

* Test service pause

* Include vacuum in coverage

* Delint

* Fix vacuum sensor dict collision.

This also prevents collision for unique id. As the key is used to construct
unique ids.

* Use f strings as dict keys

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 18:30:17 +02:00
Daniel Hjelseth Høyer c651cff6a0
Bump Mill library to 0.6.1 (#57261) 2021-10-07 18:23:03 +02:00
J. Nick Koston a2dcc0308b
Discover tplink devices periodically (#57221)
- These devices sometimes do not respond on the first try
  or may be subject to transient broadcast failures, or
  overloads. We now try discovery periodically once the
  integration has been loaded.

- We used to try this 4x at startup, but that solution
  seemed to aggressive as we want to be sure we pickup
  the devices after startup as well since the network
  will likely be more calm after startup.
2021-10-07 17:52:24 +02:00
Maciej Bieniek a238cce37c
Update led brightness select state only if valid data is available, Xiaomi Miio integration (#57197)
* Update state if there is valid data

* Add comment
2021-10-07 17:44:25 +02:00
Erik Montnemery 0e48985fc5
Validate initial value for input_datetime (#57256) 2021-10-07 17:13:07 +02:00
Jeff Irion 9dfb684002
Enable template icons for template selects (#57092)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-10-07 15:38:02 +02:00
Martin Hjelmare 82828b5a1b
Fix netgear config flow import (#57253) 2021-10-07 15:08:53 +02:00
Marc Mueller e5b93cdcaf
Use EntityDescription - darksky (#57083)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-10-07 14:07:17 +02:00
Erik Montnemery 7223c59e79
Allow resetting an MQTT number (#57161)
* Allow resetting an MQTT number

* Add abbreviation
2021-10-07 13:54:34 +02:00
Paulus Schoutsen a4d9019ffc
Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
Robert Svensson 750dd9186e
Improve deCONZ signal strings (#57140) 2021-10-07 12:48:27 +02:00
Aaron Bach 2ba8e1030c
Ensure that WattTime is strictly typed (#57130) 2021-10-07 12:40:10 +02:00
Franck Nijhof 24fa2a714a
Toon, support Energy dashboard by default (#57233) 2021-10-07 11:59:04 +02:00
Erik Montnemery 947ae23749
Add home-assistant/core as codeowner for recorder (#57224) 2021-10-07 08:56:43 +02:00
GitHub Action 8fea54fff7 [ci skip] Translation update 2021-10-07 00:10:57 +00:00
starkillerOG 3e89ebb1cb
Remove Netgear tracker link_rate check on Orbi (#57032)
* Netgear tracker: remove link_rate check on Orbi

* fix debug message

* Add orbi models

* check start of model in V2 check

* fix black
2021-10-06 13:30:13 +02:00
Erik Montnemery 8337baa354
Correct migration to recorder schema 18 (#57165) 2021-10-06 13:29:42 +02:00
Jean-Yves Avenard 9d84d41f81
Change energy state class to STATE_CLASS_TOTAL (#56974) 2021-10-06 13:24:17 +02:00
Bram Kragten e69a1c3546
Update frontend to 20211006.0 (#57164) 2021-10-06 11:33:55 +02:00
Tomasz e9f6bc7364
Add missing return type to async_unload_entry and async_setup_entry (#57115) 2021-10-06 10:48:11 +02:00
Thomas Schamm aa03b63884
Skip link local addresses in bosch_shc discovery step (#57074) 2021-10-06 10:09:02 +02:00
Fredrik Erlandsson a809f5fcf7
Update Daikin config_flow with better error handling (#57069) 2021-10-06 10:07:30 +02:00
Paulus Schoutsen 222a0c26e0
Guard upnp create device (#57156) 2021-10-05 21:31:11 -07:00
Lawrence 205b40cf16
Updated amberelectic attributes to reflect unit change to $/kWh (#57109) 2021-10-05 20:34:23 -07:00
Simone Chemelli d51d70d3be
Fix Fritz shutdown race condition (#57148) 2021-10-05 20:26:18 -07:00
Simone Chemelli 9de3bd77d8
Fix SamsungTV shutdown race condition (#57149) 2021-10-05 20:25:57 -07:00
J. Nick Koston 7e5dfadc27
Add sw_version and model to flux_led device info (#56958) 2021-10-05 14:53:39 -10:00
J. Nick Koston 286ffb2d71
Write flux_led state after turning on/off (#57152) 2021-10-05 14:49:42 -10:00
GitHub Action a8b7c521f6 [ci skip] Translation update 2021-10-06 00:12:58 +00:00
J. Nick Koston d60f6a9943
Add additional devices to flux_led discovery (#57086) 2021-10-05 13:06:17 -10:00
Tom Brien 659229e255
Add support for POLY and RLY in Coinbase (#57144)
* Support POLY currency

* Support RLY currency
2021-10-05 15:18:17 -06:00
Aaron Bach 25253f2b7a
Use current config entry standards for OpenUV (#57137) 2021-10-05 15:03:39 -06:00
J. Nick Koston eba7cad33f
Fix yeelight connection when bulb stops responding to SSDP (#57138) 2021-10-05 13:41:56 -07:00
Raman Gupta e22407ba16
Bump zwave-js-server-python to 0.31.3 (#57143) 2021-10-05 22:33:23 +02:00
Paulus Schoutsen 34544da449
Reinstate asking for country in Tuya flow (#57142) 2021-10-05 22:32:48 +02:00
indykoning f76cb12945
Fix Growatt login invalid auth response (#57071) 2021-10-05 12:31:23 -07:00
Paulus Schoutsen 1a7a4c52f1
Bump aiohue to 2.6.3 (#57125) 2021-10-05 19:42:45 +02:00
jrester e66064fb3e
Update tesla_powerwall to 0.3.11 (#57112) 2021-10-05 19:40:37 +02:00
Franck Nijhof 86852df2fc
Bump tuya-iot-py-sdk to 0.5.0 (#57110)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-05 10:21:55 -07:00
Raman Gupta 3c074ab865
Add additional properties to node_status WS cmd (#56927)
* Add node.zwave_plus_version to node_status WS command

* Add highest security class to node_status
2021-10-05 11:23:44 -04:00
Franck Nijhof 80a04124a2
Small code styling tweaks for Tuya (#57102) 2021-10-05 12:59:51 +02:00
Otto Winter 5b218d7e1c
Bump aioesphomeapi from 9.1.4 to 9.1.5 (#57106) 2021-10-05 11:49:39 +02:00
Franck Nijhof 2059cbacbd
Remove Python shebang line from Tuya integration files (#57103) 2021-10-05 11:12:55 +02:00
Franck Nijhof 653eb3e29d
Upgrade debugpy to 1.5.0 (#57098) 2021-10-05 11:12:35 +02:00
Franck Nijhof b5916c8310
Upgrade sentry-sdk to 1.4.3 (#57096) 2021-10-05 11:11:33 +02:00
Franck Nijhof f364d53c7b
Prevent Tuya from accidentally logging credentials in debug mode (#57100) 2021-10-05 10:22:28 +02:00
Robert Svensson 59b1433e5c
Additional place to use isinstance rather than do a string compare (#57094) 2021-10-05 09:17:45 +02:00
Allen Porter 8026a14bc8
Bump nest 0.3.7 to prepare for WebRTC support (#57089) 2021-10-04 20:59:23 -07:00
Paulus Schoutsen 11ed70b774
Fix energy gas price validation (#57075) 2021-10-04 20:52:40 -07:00
Bram Kragten 91d3d39f6c
Update frontend to 20211004.0 (#57073) 2021-10-04 20:52:17 -07:00
GitHub Action 1e5d408426 [ci skip] Translation update 2021-10-05 00:12:33 +00:00
Paulus Schoutsen d743891842
Update Tuya code owners (#57078) 2021-10-04 15:44:17 -07:00
Shay Levy c8dc5d15ee
Fix: Shelly Gen2 - filter unsupported sensors (#57065) 2021-10-04 13:46:46 -07:00
Tomasz 08cebb247f
Activate mypy for rpi_power (#57047) 2021-10-04 22:13:11 +02:00
J. Nick Koston d08b65db7d
Update esphome reconnect logic to use newer RecordUpdateListener logic (#57057) 2021-10-04 19:52:08 +02:00
Alexei Chetroi 723596076d
Add ZHA HVAC Action sensor (#57021)
* WIP

* Refactor multi-entity matching

Eliminate the notion on primary channel.

* Cleanup climate tests

* Refactor multi-entity match

Remove the "primary channel" in multiple entity matches

* Cleanup

* Add HVAC Action sensor

* Add a "stop_on_match" option for multi entities matches

Nominally working HVAC state sensors

* Add id_suffix for HVAC action sensor

* Fix Zen HVAC action sensor

* Pylint
2021-10-04 12:57:58 -04:00
Erik Montnemery 69875cbd11
Improve sensor statistics validation (#56892) 2021-10-04 09:47:44 -07:00
Marc Mueller 2f9943fe7a
Use NamedTuple for repetier API methods (#56941) 2021-10-04 17:41:51 +02:00
Paulus Schoutsen eb9b9c57a4 [ci skip] Translation update 2021-10-04 08:38:24 -07:00
Joakim Sørensen 745298408a
Rewrite tuya config flow (#57043)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-10-04 08:27:24 -07:00
Erik Montnemery 8567aa9e13
Evict purged states from recorder's old_state cache (#56877)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-10-04 08:21:40 -07:00
Chris Browet 12c32ac806
Universal media player: consider unknown as inactive child state (#57029) 2021-10-04 17:10:41 +02:00
Marc Mueller 771740c5f9
Fix multiline lambda formatting - homekit_controller (#57046) 2021-10-04 16:12:22 +02:00
Marc Mueller 96681ab3a9
Use NamedTuple for darksky condition picture (#56942) 2021-10-04 13:38:32 +02:00
Marc Mueller e0ab4ee842
Use NamedTuple for homekit valve type + service info (#56944) 2021-10-04 13:35:31 +02:00
Sylvia van Os dc6f6b7f68
Remove Essent integration (#56991) 2021-10-04 13:31:40 +02:00
Otto Winter bf9f55c376
Bump aioesphomeapi from 9.1.2 to 9.1.4 (#57036) 2021-10-04 13:23:11 +02:00