Commit Graph

9423 Commits (e5b0bbcca61e90177f40b16eac9138ac19564fc6)

Author SHA1 Message Date
Robert Svensson 8d06527cb1
Improve deCONZ services code quality (#56904)
* setup and unload services does not need to be async

* Only use DECONZ_DOMAIN to decide if service should be setup

* Consolidation of functionality

* Make a service to schema dictionary
2021-10-01 14:31:38 -04:00
Jeff Irion 15a8f6741b
Enable template icons for template numbers (#56154) 2021-10-01 09:35:44 -07:00
Ricardo Steijn c0016415aa
Handle missing serial extended parameters in crownstone (#56864) 2021-10-01 08:42:32 -07:00
Robert Svensson 1c1bb057d7
CLIPGenericFlag should be deCONZ sensor not binary sensor (#56901) 2021-10-01 17:10:01 +02:00
Glenn Waters e4f15c42e0
Add kPa as a pressure unit (#56885) 2021-10-01 08:08:04 -07:00
Robert Svensson 0916322a43
Deduplicate controls of UniFi services (#56834)
* Fix left over comments from #56717 - no need to keep UNIFI_SERVICES if we control it is only called while UNIFI_DOMAIN is empty

* Fix late comments as well

* Improve service tests

* mock.called_with was not reliable
2021-10-01 15:59:29 +02:00
Daniel Hjelseth Høyer 4a2ed97e0d
Add locking state to surepetcare locks (#56830) 2021-09-30 08:16:35 -07:00
Erik Montnemery 6af1a835e6
Optimize statistics generation (#56821)
* Optimize statistics generation

* pylint
2021-09-30 17:14:36 +02:00
Daniel Hjelseth Høyer d5bda3ac14
Surepetcare reauthorize (#56402)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-30 10:11:45 -05:00
Erik Montnemery 6954614e62
Warn if total_increasing sensor has negative states (#56564) 2021-09-30 07:49:16 -07:00
Niels Mündler 3a56e3a823
Correctly handle offline and unsupported printers during setup (#55894) 2021-09-30 16:29:51 +02:00
Robert Svensson d61a9e8b72
Service to remove clients from UniFi Controller (#56717) 2021-09-30 14:38:29 +02:00
Kevin Stillhammer dd52ec78c7
Add Kraken delay after first update to avoid limit (#55736)
* Add delay after first update to avoid limit

* Apply suggestions
2021-09-30 13:23:46 +02:00
Oliver Ou d3b1ccb668
Tuya v2 Integration Release (#56820)
Co-authored-by: 乾启 <18442047+tsutsuku@users.noreply.github.com>
Co-authored-by: dengweijun <dengweijunben@gmail.com>
Co-authored-by: dengweijun <mengzi.deng@tuya.com>
Co-authored-by: erchuan <jie.zheng@tuya.com>
Co-authored-by: erchuan <erchuan365@outlook.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-09-30 12:02:56 +02:00
Julian Löhr 26042bdad7
Add Fritz!DECT 440 humidity sensor (#54597)
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2021-09-30 11:56:38 +02:00
Simone Chemelli 8993ff0377
Fritz new binary sensor for link and firmware status + code cleanup (#55446) 2021-09-30 11:18:04 +02:00
Rami Mosleh 51addfc164
Add device_info to `Speedtestdotnet` and some code cleanup (#56612)
* Apply code cleanup suggestions from previous PRs

* Update homeassistant/components/speedtestdotnet/const.py

Co-authored-by: Franck Nijhof <git@frenck.dev>

* fix native_value, and ping value in test

* use self._state instead of _attr_native_value

* update identifiers and add more tests

Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-09-30 08:28:04 +02:00
J. Nick Koston 2ed35debdc
Fix dhcp discovery matching due to deferred imports (#56814) 2021-09-29 23:50:21 -05:00
jjlawren 2ff1fc83bc
Add latest added media as Plex library sensor attribute (#56235) 2021-09-29 17:11:53 -07:00
Martin Hjelmare 12b2076351
Fix zwave_js config flow import step (#56808) 2021-09-30 01:15:05 +02:00
Martin Hjelmare fa716d92ad
Manage s2 keys in zwave_js (#56783) 2021-09-29 15:04:24 -07:00
Erik Montnemery 8c3fc95fb8
Fallback to state machine in statistics (#56785) 2021-09-29 14:57:16 -07:00
Robert Svensson f224ab6d67
Use isinstance to verify class in deCONZ integration (#56794)
* Don't enable any variants of the daylight sensor entities by default

* Use isinstance rather than doing ZHATYPE compare

* Accidentally removed an import
2021-09-29 21:19:21 +02:00
jjlawren 8f4ba564d4
Plex media browser improvements (#56312) 2021-09-29 11:17:55 -07:00
Erik Montnemery ef13e473cf
Warn if template functions fail and no default is specified (#56453)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-09-29 20:16:02 +02:00
Alexei Chetroi dbba2c4afe
Add "Summation Delivered" Sensor for SmartEnergy metering ZHA channel (#56666) 2021-09-29 09:35:20 -07:00
Daniel Hjelseth Høyer 60eb426451
Add Surepetcare locks (#56396)
* Surepetcare, add lock

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Fix tests

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Surepetcare, lock name

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* surepetcare_id

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* typing

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Fix review comment

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Fix review comment

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Fix review comment

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* add more tests

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Fix review comment

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>
2021-09-29 09:17:12 -07:00
Martin Hjelmare 50fffe48f8
Add zwave to zwave_js migration (#56159)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-09-29 08:55:27 -07:00
Daniel Hjelseth Høyer d5c3d234ec
Open garage, add config flow (#55290) 2021-09-29 09:43:51 -06:00
Erik Montnemery 40ecf22bac
Remove automatic splitting of net meters from statistics (#56772) 2021-09-29 17:20:17 +02:00
Erik Montnemery 00651a4055
Optimize _get_states_with_session (#56734)
* Optimize _get_states_with_session

* Move custom filters to derived table

* Remove useless derived table

* Filter old states after grouping

* Split query

* Add comments

* Simplify state update period criteria

* Only apply custom filters if we didn't get an include list of entities

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-29 17:08:27 +02:00
avee87 daebc34f4d
Add code_format to template alarm (#56700)
* Added code_format to template alarm

* review comment

* review comment

* use constant

* back to enum

* none -> no_code
2021-09-29 16:59:46 +02:00
Franck Nijhof 41e5f05d99
Fix energy validation when not tracking costs (#56768) 2021-09-29 13:24:34 +02:00
Joakim Sørensen 6a9b484f2d
Remove timeout for backup services (#56763) 2021-09-29 09:46:05 +02:00
Regev Brody 115bb39c10
Fix cover group to handle unknown state properly (#56739)
* fix cover group unknown state

* fix cover grup state

* fix cover group issue
2021-09-29 08:37:16 +02:00
João Pedro Hickmann 4513a46248
Add zeroconf support for yeelight (#56758) 2021-09-28 20:53:43 -05:00
Myles Eftos 8e91e6e97e
Adding price spike binary sensor to the Amber electric integration (#56736) 2021-09-28 18:01:35 -07:00
J. Nick Koston cf36d0966d
Add coverage to verify tplink unique ids (#56746) 2021-09-28 17:57:22 -07:00
Michael Chisholm f7d95588f8
Provide most media metadata in DlnaDmrEntity (#56728)
Co-authored-by: Steven Looman <steven.looman@gmail.com>
2021-09-28 19:37:23 -05:00
Raman Gupta e76ddb4b27
Add proper S2 support for adding zwave_js nodes (#56516)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-28 15:37:45 -07:00
J. Nick Koston bc59387437
Explictly close the TPLink SmartDevice protocol on unload (#56743)
* Explictly close the TPLink SmartDevice protocol on unload

- There is a destructor that will eventually do this when
  the object gets gc. Its better to explictly do it at
  unload.

* fix coro mock
2021-09-28 18:36:45 +02:00
J. Nick Koston c95f7a5ba6
Add network support to tplink for discovery across subnets (#56721) 2021-09-28 09:58:25 -05:00
jjlawren 0d6aa89fd4
Refactor Sonos alarms and favorites updating (#55529) 2021-09-28 09:49:32 +02:00
Diogo Gomes 922d4c42a3
Inherit Filter sensor state_class from source sensor (#56407) 2021-09-28 09:30:21 +02:00
Raman Gupta e690d4b006
Add support for zwave_js device actions (#53038)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-28 09:06:02 +02:00
Myles Eftos 412ecacca3
Amberelectric (#56448)
* Add Amber Electric integration

* Linting

* Fixing some type hinting

* Adding docstrings

* Removing files that shouldn't have been changed

* Splitting out test helpers

* Testing the price sensor

* Testing Controlled load and feed in channels

* Refactoring mocks

* switching state for native_value and unit_of_measurement for native_unit_of_measurement

* Fixing docstrings

* Fixing requiremennts_all.txt

* isort fixes

* Fixing pylint errors

* Omitting __init__.py from test coverage

* Add missing config_flow tests

* Adding more sensor tests

* Applying suggested changes to __init.py__

* Refactor coordinator to return the data object with all of the relevent data already setup

* Another coordinator refactor - Better use the dictionary for when we build the sensors

* Removing first function

* Refactoring sensor files to use entity descriptions, remove factory

* Rounding renewable percentage, return icons correctly

* Cleaning up translation strings

* Fixing relative path, removing TODO

* Coordintator tests now accept new (more accurate) fixtures

* Using a description placeholder

* Putting missing translations strings back in

* tighten up the no site error logic - self._site_id should never be None at the point of loading async_step_site

* Removing DEVICE_CLASS, replacing the units with AUD/kWh

* Settings _attr_unique_id

* Removing icon function (it's already the default)

* Apply suggestions from code review

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

* Adding strings.json

* Tighter wrapping for try/except

* Generating translations

* Removing update_method - not needed as it's being overriden

* Apply suggestions from code review

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

* Fixing tests

* Add missing description placeholder

* Fix warning

* changing name from update to update_data to match async_update_data

* renaming [async_]update_data => [async_]update_price_data to avoid confusion

* Creating too man renewable sensors

* Override update method

* Coordinator tests use _async_update_data

* Using $/kWh as the units

* Using isinstance instead of __class__ test. Removing a zero len check

* Asserting self._sites in second step

* Linting

* Remove useless tests

Co-authored-by: jan iversen <jancasacondor@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-09-28 00:03:51 -07:00
J. Nick Koston f93539ef4c
Add api to the network integration to get ipv4 broadcast addresses (#56722) 2021-09-27 21:43:39 -07:00
Erik Montnemery 8ef123259e
Add WS API for updating unit_of_measurement in statistics metadata (#56184)
* Add WS API for updating statistics metadata

* Update homeassistant/components/recorder/websocket_api.py

Co-authored-by: Bram Kragten <mail@bramkragten.nl>

* Update homeassistant/components/recorder/websocket_api.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Fix typo

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-09-28 00:43:29 +02:00
Diogo Gomes ec9fc0052d
Define `unit_of_measurement` of all `utility_meter` sensors on HA start (#56112)
* define unit_of_measurement on hass start

* delay utility_meter state

* check state

* store siblings

* don't check unit_of_measurement
2021-09-28 00:42:27 +02:00
Erik Montnemery 5976f898da
Add WS API for removing statistics for a list of statistic_ids (#55078)
* Add WS API for removing statistics for a list of statistic_ids

* Refactor according to code review, enable foreign keys support for sqlite

* Adjust tests

* Move clear_statistics WS API to recorder

* Adjust tests after rebase

* Update docstring

* Update homeassistant/components/recorder/websocket_api.py

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

* Adjust tests after rebase

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-09-27 23:30:13 +02:00