Commit Graph

9840 Commits (5e2d71dc9037b9c9186bff846eaf74490209f3cf)

Author SHA1 Message Date
Robert Svensson 9c1bee9c16
Add support for device configuration URL to UniFi Controller (#58237) 2021-10-22 20:04:25 +02:00
Raman Gupta e5255cf21f
Add area_entities and area_devices template functions/filters (#55228) 2021-10-22 19:59:01 +02:00
Petro31 806dc51125
Add datetime_today template method (#57435) 2021-10-22 19:51:22 +02:00
epenet 001a452bb7
Update naming scheme for Renault entities (#57922)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-22 19:46:02 +02:00
Ville Skyttä 73d192b3f3
Use HTTPStatus instead of HTTP_ consts and magic values in comp.../[bc]* (#57989) 2021-10-22 19:43:40 +02:00
Robert Svensson ab7a34fc71
Add support for device configuration URL to deCONZ gateway (#58184) 2021-10-22 19:41:49 +02:00
J. Nick Koston 3b7dce8b95
Index in-progress flows to avoid linear search (#58146)
Co-authored-by: Steven Looman <steven.looman@gmail.com>
2021-10-22 07:19:49 -10:00
Klaas Schoute efbe8a8689
Fix unit of measurement for P1 Montior (#57495) 2021-10-22 18:24:12 +02:00
Lars 416d87c01c
Fix fritzbox tests (#58227) 2021-10-22 17:29:36 +02:00
Ville Skyttä 8bc1509afa
Use HTTPStatus instead of HTTP_ consts and magic values in comp.../[de]* (#57990) 2021-10-22 16:28:56 +02:00
Ryan Fleming c84fee7c6e
Rework octoprint (#58040)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-22 15:25:12 +02:00
Lars 2148c84386
Support for Fritz!DECT 500 lightbulbs (#52830) 2021-10-22 14:30:03 +02:00
thomas-svrts f25d3cf9b3
Gogogate2 add statistics (#58178)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-10-22 14:24:43 +02:00
Ville Skyttä a598d9f353
Use HTTPStatus instead of HTTP_ consts and magic values in components/a* (#57988) 2021-10-22 14:21:34 +02:00
avee87 a0bb2c8b33
Add memory/cpu percentage to Supervisor addons entities (#57468)
* Add memory/cpu percentage to Supervisor addons entities

* fixed lint

* Use a single update function. Fixed tests

* use constant

* review comments

* oops
2021-10-22 12:23:21 +02:00
epenet c00a5fad8f
Cleanup device registration in Onewire (#58101)
* Add checks for device registry

* Move registry checks to init.py

* Run device registry check on disabled devices

* Empty commit for testing

* Register devices during initialisation

* Adjust tests accordingly

* Add via_device to device info

* Adjust access to device registry

Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-22 11:45:40 +02:00
Robert Svensson 281adfe3c9
Add support for device configuration URL to Axis devices (#58176) 2021-10-22 11:09:50 +02:00
Erik Montnemery 547e36ae94
Tweak energy validator (#58018)
* Tweak energy validator

* Update code and tests

* Tweak implementation

* Update tests

* Update after rebase
2021-10-22 10:38:04 +02:00
Steven Looman dcf60b54ce
Improve SSDP discovery compatibility when device was discovery through an SSDP advertisement (#58133) 2021-10-21 10:57:34 -10:00
ANMalko 626bd25129
Add LOOKin integration (#58125)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-10-21 07:10:23 -10:00
Erik Montnemery df1154395e
Revert "Swap order of int template helper kwargs (#57729)" (#58015)
This reverts commit f8dbcb953c.
2021-10-21 15:03:33 +02:00
Brig Lamoreaux 50686bd06d
Add Device Type Energy to Srp Energy Sensor (#58147) 2021-10-21 08:35:59 +02:00
Franck Nijhof dcaa689023
Add auto slider/box mode to number entity (#57737) 2021-10-21 07:20:39 +02:00
jan iversen f2a5d92e61
Fix connect_fail test and modbus.py 100% coverage (#57894)
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2021-10-20 15:22:24 -07:00
jan iversen cca7da77ad
Report modbus buffer too small or too big to unpack (#57838) 2021-10-20 15:22:01 -07:00
Andrey Kupreychik a824fa9a7b
Abort keenetic SSDP discovery if the unique id is already setup or ignored (#58009) 2021-10-20 14:53:23 -07:00
Erik Montnemery c1d671b817
Fix template sensor when name template doesn't render (#58088) 2021-10-20 14:53:06 -07:00
Erik Montnemery 398061706c
Correct unit_of_measurement for statistics sensor (#58023) 2021-10-20 20:28:48 +02:00
Robert Svensson 333c80a694
Assign entity category diagnostics to deCONZ tampering sensors (#58112) 2021-10-20 20:24:11 +02:00
Erik Montnemery b301ab25a3
Purge short term statistics (#58028)
* Purge short term statistics

* Less meep

* Add tests
2021-10-20 16:00:59 +02:00
Erik Montnemery 558c2556f1
Report all unrecorded sensors in statistics tool (#58092) 2021-10-20 15:58:28 +02:00
Erik Montnemery e3534eec87
Report orphaned statistics in statistic validation (#57324) 2021-10-20 15:57:22 +02:00
Jan Bouwhuis e2303dc713
bitwise and for test supported_features (#58097) 2021-10-20 15:31:23 +02:00
jan iversen b3117ced75
Please pylint for modbus test (#58089) 2021-10-20 13:38:55 +02:00
jan iversen 45983b5edf
Activate tradfri in coverage and clean conftest for tradfri (#58058) 2021-10-20 13:36:02 +02:00
Jan Bouwhuis 62b7453719
Fix supported_features behaviour for fan platform (#58065) 2021-10-20 13:06:06 +02:00
Jan Bouwhuis a679ebcee7
Patch for Alexa percentage_step to precision (#58062)
* speed_step must be an integer and a divider of 100

* use percentage_step in tests to test patch

* test with not supported percentage_step

* undo change in test_capabilities

* Use a default precision of one not percentage_step

* typo 2

* Update tests/components/alexa/test_smart_home.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/alexa/capabilities.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-10-20 13:05:11 +02:00
epenet dfd2501c2c
Cleanup duplicate code in Onewire tests (#58082)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-20 11:43:59 +02:00
Robert Svensson 008b784fc5
Add deCONZ number config entity for Hue motion sensor delay (#58076)
* First working draft of number platform

* Replace duration with delay for Hue motion sensors
Improve tests

* Bump dependency to v85

* Use constant for entity category

* Use type rather than using __class__

* Fix unique ID
2021-10-20 11:23:24 +02:00
Robert Svensson edefa9f4f4
Assign entity category diagnostics to deCONZ battery sensors (#58077) 2021-10-20 09:11:17 +02:00
epenet 704929ddd0
Remove legacy tests in onewire (#58075)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-20 09:10:32 +02:00
Aaron Bach bf7c99c1f8
Migrate SimpliSafe to new web-based authentication (#57212) 2021-10-19 10:09:48 -10:00
epenet 1b0118a81b
Use constants in Onewire tests (#58017)
* Use ATTR_ENTITY_ID constant

* Add ATTR_UNIQUE_ID constant

* Add new attribute constants

* Fix missing ATTR_DEFAULT_DISABLED

Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-19 21:41:01 +02:00
Paulus Schoutsen ab0247d112
Add entity category and state class to mobile app (#58012) 2021-10-19 12:29:22 -07:00
Brig Lamoreaux d1e30fdd54
Rewrite test for feedreader (#57292)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-19 17:15:56 +02:00
Paulus Schoutsen 4fe4e65e3e
Add entity category to Hue (#58011) 2021-10-19 12:29:43 +02:00
Jan Bouwhuis 58569a58a9
MQTT Alarm control panel - Enable remote code validation (#57764)
* Enable remote code validation

* Update homeassistant/components/mqtt/alarm_control_panel.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-10-19 12:07:38 +02:00
Erik Montnemery 961ee717ef
Store automation and script traces (#56894)
* Store automation and script traces

* Pylint

* Deduplicate code

* Fix issues when no stored traces are available

* Store serialized data for restored traces

* Update WS API

* Update test

* Restore context

* Improve tests

* Add new test files

* Rename restore_traces to async_restore_traces

* Refactor trace.websocket_api

* Defer loading stored traces

* Lint

* Revert refactoring which is no longer needed

* Correct order when restoring traces

* Apply suggestion from code review

* Improve test coverage

* Apply suggestions from code review
2021-10-19 10:23:23 +02:00
epenet 29c062fcc4
Rework Onewire tests to enable disabled entities (#58014)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-19 09:10:26 +02:00
Robert Hillis 4625a05706
Add init tests for agent dvr (#57022)
* Add init tests for agent dvr

* ci
2021-10-19 08:53:30 +02:00
Brian Egge 708f2ae089
Fix issue parsing color effect None in flux_led (#57979)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-10-18 20:36:25 -10:00
Erik Montnemery 9a26a8cfd8
Add support for daily and monthly statistics (#57576)
* Add support for daily and monthly statistics

* Remove debug code

* Format code

* Don't use dateutil package

* Remove 2 TODOs

* Remove TODO

* Add comments
2021-10-19 08:29:23 +02:00
J. Nick Koston 6576225c48
Log unhandled loop exception traces when asyncio debug is on (#57602) 2021-10-18 20:07:51 -07:00
jan iversen f92fe38bbd
Change warning to info when modbus is ready (#57953)
* Change warning to info.

* Make level info implicit.
2021-10-18 19:38:33 -07:00
Erik Montnemery 2bae113748
Mark Tasmota status sensors as diagnostic sensors (#57958)
* Mark Tasmota status sensors as diagnostic sensors

* Disable IP and firmware version sensors by default
2021-10-18 19:33:26 -07:00
Zac West 1904019b5f
Include webhook_id in mobile_app's notify registration_info (#58007) 2021-10-18 19:29:13 -07:00
Felipe Martins Diel 6f0a7d2921
Add to the Broadlink integration support for voltage, current, overload and total consumption sensors (#53628) 2021-10-18 11:38:51 -10:00
starkillerOG 9bd2115a20
Motion blinds add interface and wait_for_push options (#50067)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-18 23:34:51 +02:00
ollo69 b01170d917
Add Nut missing tests for config flow (#57964) 2021-10-18 07:17:10 -10:00
epenet 24737d4d1d
Use pytest fixtures on Onewire tests (#57973)
* Add pytest fixtures

* Add sysbus fixtures

* Adjust parameter name

Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-18 19:16:53 +02:00
Erik Montnemery 47fdf078e4
Bump hatasmota to 0.2.21 (#57966) 2021-10-18 18:41:18 +02:00
Erik Montnemery 786e1f9b6a
Add configuration url to Tasmota (#57957) 2021-10-18 14:53:47 +02:00
epenet a421c524c1
Use pytest fixtures on Renault tests (#57955)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-18 13:27:44 +02:00
Robert Svensson ed37d2a794
New service reconnect_client for UniFi integration (#57570)
* Initial proposal of a client reconnect service

* Slim setup and teardown of services

* Minor improvements

* Add tests
2021-10-18 08:06:06 +02:00
J. Nick Koston cac0c04a91
Avoid setting up harmony websocket from discovery (#57589) 2021-10-17 20:32:02 -07:00
J. Nick Koston 147febb18a
Prevent yeelight discovery from overloading the bulb (#57820) 2021-10-17 20:30:43 -07:00
Allen Porter dafea00f41
Rename `stream_type` to `frontend_stream_type` (#57923)
Camera devices may support multiple stream sources so we want to clarify that
this is meant to decide which stream source is used in the frontend only.

Will set stream_type temporarily to allow rollout without breaking nightly,
and this will be removed after frontend is updated.
2021-10-17 20:16:29 -07:00
Allen Porter 4501906da3
Fix additional nest camera_sdm_tests to use STATE_STREAMING (#57920) 2021-10-17 22:04:12 +02:00
J. Nick Koston d09ee11c54
Fix bond reloading on zeroconf discovery when host has not changed (#57799) 2021-10-17 19:50:13 +02:00
Allen Porter 3d33cad655
Improve nest error handling for websocket streams (#57885) 2021-10-17 19:46:18 +02:00
Allen Porter 95b07c138c
Set `nest` camera always on STATE_STREAMING (#57882) 2021-10-17 19:45:31 +02:00
ollo69 fe0291012c
Use attr_device_info and add init tests for nut (#57725) 2021-10-17 07:43:15 -10:00
Robert Svensson 93ba966808
Add the correct device class to deCONZ Tamper entity (#57834) 2021-10-17 17:45:32 +02:00
Maciej Bieniek 85c6942f55
Bump `brother` library to version 1.1.0 (#57892) 2021-10-17 00:12:35 -10:00
Maciej Bieniek 0b932b53c9
Do not probe `nam` device if the host is already configured (#57843) 2021-10-17 00:12:01 -10:00
Marvin Wichmann 48d4cdf882
Update xknx to 0.18.11 and fix flaky test (#57877)
* Update xknx to 0.18.11

* review: join the queue before actually asserting
2021-10-17 09:43:18 +02:00
avee87 6a80559fa8
Use separate weather condition for clear night in MetOffice forecasts (#55135) 2021-10-17 00:57:47 +02:00
Michael 2fa08ae6ab
Add hassio discovery to VLC telnet (#57815) 2021-10-16 14:53:57 -07:00
J. Nick Koston 0dcb8ca270
Avoid probing brother devices that have an existing config entry (#57829) 2021-10-16 14:52:10 -07:00
Robert Hillis 4b474f47f2
Add configuration URL to Efergy (#57839)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-10-16 20:33:17 +02:00
J. Nick Koston 76b6fce19c
Avoid exposing effects to flux_led lights that do not support them (#57810) 2021-10-15 18:54:00 -10:00
jan iversen 34984d78a1
Add float32 test to modbus (#57805) 2021-10-15 16:06:36 -07:00
Steven Looman b75f1b8951
Fix broken upnp derived sensors reporting b/s instead of kb/s (#57681) 2021-10-15 13:03:03 -07:00
Martin Hjelmare 31ccaac865
Add vlc telnet config flow (#57513) 2021-10-15 11:46:58 -07:00
J. Nick Koston fb5d117df4
Always send color/temp when switching from an effect in yeelight (#57745) 2021-10-15 09:37:23 -07:00
J. Nick Koston 427f2a085b
Reconnect and retry yeelight commands after previous wifi drop out (#57741) 2021-10-15 09:37:13 -07:00
Martin Hjelmare 5aba8a7c81
Fix modem_callerid test warning (#57760) 2021-10-15 09:36:26 -07:00
Erik Montnemery 0f2b5ea28e
Don't expose config or diagnostic entities to cloud (#57771) 2021-10-15 09:35:32 -07:00
Erik Montnemery 8b33aa3702
Don't expose config or diagnostic entities to Google Assistant (#57669) 2021-10-15 09:12:34 -07:00
Erik Montnemery 7c1ba8be3d
Don't expose config or diagnostic entities to Amazon Alexa by default (#57770) 2021-10-15 09:09:24 -07:00
Erik Montnemery 2b37943355
Don't add indirectly referenced config entities to service calls (#57671) 2021-10-15 08:46:43 -07:00
epenet 6881ab58d1
Add renault last activity sensors (#57750)
* Add battery and location last_activity sensors

* Drop state attributes

* Drop ATTR_LAST_UPDATE

* Adjust tests

* Mark new sensors as disabled_default

* Add default_disabled attribute

* Add context managers

* Adjust tests for disabled entities
2021-10-15 16:27:12 +02:00
Erik Montnemery 1eebe45154
Add support for entity categories to MQTT entities (#57656)
* Add support for entity categories to MQTT entities

* Improve test

* Apply suggestions from code review

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

* Update homeassistant/components/mqtt/mixins.py

Co-authored-by: Paul Monigatti <paulmonigatti@users.noreply.github.com>

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Paul Monigatti <paulmonigatti@users.noreply.github.com>
2021-10-15 14:28:30 +02:00
Petro31 f8dbcb953c
Swap order of int template helper kwargs (#57729)
* swap order of int kwargs

* Add binary and kwargless base tests
2021-10-15 13:04:26 +02:00
Joakim Sørensen 0e0430ba36
Remove YAML import from UptimeRobot (#57761) 2021-10-15 12:33:10 +02:00
Steffen Ronalter 49b07224bf
Add onewire support for DS2413 (#55921) 2021-10-15 08:23:26 +02:00
jan iversen 4417ffb407
COnvert DATA_TYPE to enum. (#57699) 2021-10-15 07:09:59 +02:00
Franck Nijhof eed9f67402
Add service configuration URL to MQTT (#57731) 2021-10-14 18:27:40 -07:00
starkillerOG e34aed743c
Xiaomi Miio appropriatly raise ConfigEntryAuthFailed/ConfigEntryNotReady (#54696)
* Add reties to cloud login

* push to version 0.4 of micloud

* distinguish between authentication error and socket errors

* raise from error

* Update homeassistant/components/xiaomi_miio/gateway.py

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

* move ConfigEntryNotReady to connect function

* remove unused import

* also add ConfigEntryNotReady for device

* catch exceptions in config flow

* fixes

* bring tests back to 100%

* add missing catch exception

* add test

* fix black

* Update homeassistant/components/xiaomi_miio/device.py

Co-authored-by: Teemu R. <tpr@iki.fi>

* Update homeassistant/components/xiaomi_miio/gateway.py

Co-authored-by: Teemu R. <tpr@iki.fi>

* Update tests/components/xiaomi_miio/test_config_flow.py

Co-authored-by: Teemu R. <tpr@iki.fi>

* fix tests

* define specific exceptions

* fix styling

* fix tests

* use proper DeviceException

* Revert "use proper DeviceException"

This reverts commit 0bd16135387cd6d9e563cd62ac147d0a25c577f3.

* use appropriate side-effect

* remove unused returns

* Update homeassistant/components/xiaomi_miio/const.py

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

* remove unused returns

Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Teemu R. <tpr@iki.fi>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-15 01:25:44 +02:00
Joakim Sørensen c243dca58e
Change name from Uptime Robot to UptimeRobot (#57714) 2021-10-15 00:50:09 +02:00
Franck Nijhof e077fb13ce
Add device configuration URL to WLED (#57692) 2021-10-14 15:46:26 -07:00
Michael 445c7301f8
Skip auto-update when fqdn and ssl-verfiy is used for Synology DSM (#57568) 2021-10-14 13:55:31 -07:00
Michael a6aff613d7
Optimize update calls for AVM Fritz!Smarthome devices (#57579) 2021-10-14 13:53:05 -07:00
Paulus Schoutsen 3c11e2a097
Add entity category to WLED (#57693) 2021-10-14 13:31:01 -07:00
Erik Montnemery 8ef8838801
Correct detection of row_number support for MariaDB (#57663) 2021-10-14 11:19:39 -07:00
Erik Montnemery e27e4c3561
Add support for device configuration URL (#57539)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-10-14 11:16:56 -07:00
Marvin Wichmann addb91d49e
Update xknx to version 0.18.10 (#57635)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-10-14 10:54:48 -07:00
Robert Hillis 488a636aec
Clean up unused loggers (#57662) 2021-10-14 10:03:38 -07:00
jan iversen debcdc382f
Late review comments. (#57654) 2021-10-14 10:22:21 +02:00
Erik Montnemery 4b3d423767
Add config and diagnostic entities (#57528)
* Add config entity concept

* Rename is_config_entity to entity_category

* Add test

* Add 'diagnostic' entity category
2021-10-14 10:04:26 +02:00
Joakim Sørensen 24509503bb
Remove snapshot from hassio integration (#57652) 2021-10-14 10:00:44 +02:00
Franck Nijhof 26faac0567
Remove YAML configuration from Rainforest Eagle (#57636) 2021-10-14 08:46:39 +02:00
ollo69 827501659c
Nut: Use coordinator data, code cleanup and add test coverage (#57643) 2021-10-13 16:05:06 -10:00
ollo69 b54fc0229d
Use entity_registry_enabled_default for Nut sensors (#56854) 2021-10-13 11:33:03 -10:00
Erik Montnemery 838f79be3d
Update tests searching for areas referenced in automations (#57558) 2021-10-13 13:27:56 -07:00
jan iversen 2734ae17f3
Modbus baseplatform.py and Validators.py 100% coverage (activate coverage) (#57546) 2021-10-13 11:51:51 -07:00
Christian Manivong 16b7375e60
Provide device_id in hue_event (#56982)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-10-13 20:20:38 +02:00
Otto Winter df4e8721e9
ESPHome move ReconnectLogic to aioesphomeapi (#57601) 2021-10-13 10:04:23 -07:00
J. Nick Koston b86e19143d
Prevent event loop delay / instability from discovery (#57463) 2021-10-13 08:37:14 -07:00
Paulus Schoutsen ffbe4cffae
Guard linking credential that is already linked (#57595)
* Guard linking credential that is already linked

* Update test descriptions
2021-10-13 17:36:31 +02:00
Paulus Schoutsen 0ae1186554
Use gather ipv wait to remove credentials to catch exceptions (#57596) 2021-10-13 17:34:57 +02:00
Erik Montnemery a5603c0076
Improve warning prints for sensor statistics (#57605) 2021-10-13 08:15:04 -07:00
Abílio Costa c97acf8713
Add support for multiple Whirlpool airconditioners (#57588) 2021-10-13 15:45:02 +02:00
Allen Porter 1fa6329c2e
Add Nest WebRTC and support Nest Battery Camera and Nest Battery Doorbell (#57299)
* Add WebSocket API for intiting a WebRTC stream

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

* Add nest support for initiating webrtc streams

Add an implementation of async_handle_web_rtc_offer in nest, with test coverage.
Issue #55302

* Rename offer variable to match overriden variable name

* Remove unnecessary checks covered by websocket function

* Update homeassistant/components/camera/__init__.py

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-13 03:28:52 -07:00
jan iversen 8d7744a74f
Warn user if Gateway is already paired (#57530)
* Warn user if Gateway is already paired.

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-13 07:16:55 +02:00
J. Nick Koston abcacd2a00
Use a human readable model name in flux_led (#57519) 2021-10-12 21:40:49 -07:00
J. Nick Koston f41aedc0f9
Fix single channel controllers with flux_led (#57458) 2021-10-12 21:40:18 -07:00
J. Nick Koston 2adb9a8bec
Refresh the bond token if it has changed and available (#57583) 2021-10-12 21:39:46 -07:00
Erik Montnemery ee98849360
Always include start point for statistics (#57182) 2021-10-12 10:39:36 -07:00
Erik Montnemery ffeb73a4f6
Add statistics tests for sensor with changing device class (#57317) 2021-10-12 09:09:32 -07:00
Erik Montnemery 007af4a7aa
Search for areas, devices and entities in script choose actions (#57554) 2021-10-12 08:49:07 -07:00
Franck Nijhof f82af47f6a
Use Tuya endpoints values from upstream library (#57537) 2021-10-12 14:33:19 +02:00
Jan Bouwhuis 879144b48d
MQTT rework constants (#57529)
* reference CONF_TOPIC to .const

* Organize common mqtt constants
2021-10-12 11:26:38 +02:00
Allen Porter d0cc890d2b
Add statistics support to nest sensors (#57393)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-10-12 10:56:57 +02:00
Erik Montnemery 0139bfa749
Detect if mysql and sqlite support row_number (#57475) 2021-10-11 21:17:18 -07:00
Franck Nijhof f561543e92
Migrate attribution attribute for Arlo (#57504) 2021-10-11 20:40:40 -07:00
Franck Nijhof e94bebdf7b
Migrate attribution attribute for Picnic (#57507) 2021-10-11 20:39:51 -07:00
J. Nick Koston 58362404ea
Simplify yeelight setup to improve reliability (#57500) 2021-10-11 20:30:23 -07:00
Erik Montnemery 7acb1b6eb9
Override the jinja2 int filter (#57470) 2021-10-12 00:12:42 +02:00
Jan Bouwhuis a36a765352
Allow MQTT discovery availability shortcut (#57479)
* replace base in availability topic

* add tests for availability shortcuts - fix import

* group constants

* simplified loop

* Moving constants to .const

* rename value to topic

* move CONF_TOPIC to .const

* move CONF_AVAILABILITY to .const

* remove check for string

* Silently ignore if no config topic is found.

* CONF_TOPIC should be required
2021-10-11 23:37:31 +02:00
Franck Nijhof 13db867c1d
Move attribution attribute to Entity base class (#57492) 2021-10-11 23:15:32 +02:00
Martin Hjelmare d10b1d9fe0
Fix watttime config flow and tests (#57498) 2021-10-11 22:08:57 +02:00
Aaron Bach 0c04ca20c6
Add ability to re-auth WattTime (#56582)
* Tests cleanup

* Still store the abbreviation

* Code review

* Remove unused attribute

* Add ability to re-auth WattTime

* Consolidate logic for entry unique ID

* Fix tests

* Fix docstring
2021-10-11 13:41:39 -05:00
J. Nick Koston 381301d978
Add the switch platform to flux_led (#57444) 2021-10-11 07:20:11 -10:00
Glenn Waters d0b37229dd
Switch to config_flow for Environment Canada (#57127)
* Add config_flow to Environment Canada

* Add unique_id

* Remove erroneous directory.

* Tests working!!

* Add back setup.

* First cut of import.

* Temp

* Tweak names.

* Import config.yaml.

* Clean up imports.

* Import working! Some refactor to clean it up.

* Add import test.

* Small optimization.

* Fix comments from code review.

* Remove CONF_NAME and config_flow for it.

* Fixup strings to match new config_flow.

* Fixes for comments from last review.

* Update tests to match new import code.

* Clean up use of CONF_TITLE; fix lint error on push.

* Phew. More cleanup on import. Really streamlined now!

* Update tests.

* Fix lint error.

* Fix lint error, try 2.

* Revert unique_id to use location as part of ID.

* Fix code review comments.

* Fix review comments.
2021-10-11 17:33:29 +02:00
Maciej Bieniek 8ee6662cff
Bump `nettigo_air_monitor` library to version 1.1.1 (#57483) 2021-10-11 17:27:04 +02:00
Aaron Bach b72f1553ea
Use current config entry standards for AirVisual (#57132) 2021-10-11 09:17:43 -06:00
Robert Hillis a827521138
Add energy management for efergy (#57472) 2021-10-11 13:16:55 +02:00
Fredrik Erlandsson cadbf7f6a9
Bump Daikin version, catch new exception during config_flow (#57080) 2021-10-11 13:11:02 +02:00
jan iversen 199cf649be
Add test of lazy_error in modbus (#57170) 2021-10-11 12:43:05 +02:00
starkillerOG d84722c3c2
Fix Netgear orbi port in ssdp discovery (#57432) 2021-10-11 11:35:29 +02:00
Robert Hillis c4eeebd7a7
Add config flow for efergy (#56890) 2021-10-11 10:07:31 +02:00
J. Nick Koston e148939b78
Convert flux_led to use asyncio (#57440) 2021-10-10 15:12:54 -10:00
icemanch 3efbd6a1c9
Flux led color support (#57353)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-10-10 09:18:15 -10:00
J. Nick Koston 5b3711ed19
Use switch format unique ids for tplink dimmers (#57346) 2021-10-10 00:02:33 -07:00
J. Nick Koston a58085639e
Restore yeelight workaround for failing to update state after on/off (#57400) 2021-10-10 00:01:45 -07:00
Abílio Costa 49d97e13de
Improve Whirlpool component code quality (#57357)
* Improve Whirlpool component code

This implements a few suggestions given in
https://github.com/home-assistant/core/pull/48346#pullrequestreview-773552670

* Add return typing

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

* Add reason assertion to config_flow test

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-10 08:49:02 +02:00
Robert Hillis 6a5895222e
Catch errors for efergy (#57326)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-09 11:23:40 +02:00
Ben fe065b2de8
Add Sure Petcare Felaqua device (#56823)
* add a SurePetcareSensor

* add the felaqua sensor

* add felaqua battery test

* fix felaqua product_id

* actually add a felaqua sensor 😅

* remove superclass
2021-10-09 01:33:41 -05:00
Paulus Schoutsen 6d0da631bf
Handle prepare timeout in websocket API (#55989) 2021-10-08 22:12:06 -07: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
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
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
Paulus Schoutsen b0f24b65d6
Drop more persistent notification patches (#57295) 2021-10-08 16:45:05 +02:00
Franck Nijhof 82160fa350
Add config flow to Stookalert (#57119) 2021-10-08 11:34:22 +02: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
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
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
Raman Gupta 3476b430db
Convert val to str when needed while calling zwave_js.set_value (#57216) 2021-10-07 13:22:33 -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
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
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
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
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
Jean-Yves Avenard 9d84d41f81
Change energy state class to STATE_CLASS_TOTAL (#56974) 2021-10-06 13:24:17 +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
Lawrence 205b40cf16
Updated amberelectic attributes to reflect unit change to $/kWh (#57109) 2021-10-05 20:34:23 -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
Erik Montnemery f6682ba99d
Block tests from opening sockets (#55516) 2021-10-05 14:46:09 -10:00
J. Nick Koston eba7cad33f
Fix yeelight connection when bulb stops responding to SSDP (#57138) 2021-10-05 13:41:56 -07: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
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
Erik Montnemery f548d1dba7
Prevent opening of sockets in mqtt tests (#57101) 2021-10-05 11:14:53 +02:00
Paulus Schoutsen 11ed70b774
Fix energy gas price validation (#57075) 2021-10-04 20:52:40 -07:00
J. Nick Koston 2f960e558f
Prevent dlna_dmr from opening sockets in tests (#57059)
Supports #55516
2021-10-04 20:25:46 +02:00
J. Nick Koston 77af741099
Prevent tplink from opening sockets in tests (#57058)
Supports #55516
2021-10-04 20:25:09 +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
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
Erik Montnemery 582788026a
Mock out network.util.async_get_source_ip in tests (#57039) 2021-10-04 15:33:13 +02:00
Erik Montnemery 70f4bdf63e
Prevent opening of sockets in watttime tests (#57040) 2021-10-04 07:09:42 -06:00
Erik Montnemery 099428fa73
Use hass_client_no_auth test fixture in additional tests (#57037) 2021-10-04 13:37:05 +02:00
Erik Montnemery 80a225ca98
Prevent opening of sockets in kira tests (#57038) 2021-10-04 13:33:29 +02:00
Oliver Ou 7446e388ed
Fix Tuya v2 login issue (#56973)
* fix login issue

* fix:login error

* update COUNTRY_CODE_CHINA line location

* added one blank line

* feat:added line #L88 was not covered by tests

* ci build errors

Co-authored-by: erchuan <jie.zheng@tuya.com>
2021-10-04 10:45:37 +02:00
Paulus Schoutsen 2d374d65b6
Mark auth voluptuous schema fields as required (#57003) 2021-10-03 22:02:30 -07:00
Paulus Schoutsen 255ffe801b
Fix tractive flaky test (#57026) 2021-10-04 06:46:06 +02:00
jjlawren 33541ab287
Shorten album titles when browsing artist (#57027) 2021-10-03 21:13:08 -07:00
Tobias Sauerwein 1747578be5
Fix camera tests (#57020) 2021-10-03 16:55:07 -07:00
J. Nick Koston 4c51d0d2cf
Round tplink energy sensors to prevent insignificant updates (#56999)
- These sensors wobble quite a bit and the precision did
  not have sensible limits which generated a massive amount
  of data in the database which was not very useful
2021-10-03 21:28:39 +02:00
Glenn Waters 57851e9623
Support connecting to ElkM1 over TLS 1.2 (#56887) 2021-10-03 08:06:29 -10:00
Daniel Hjelseth Høyer 2fdef0e144
Update surepetcare test (#56871)
Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>
2021-10-03 14:28:52 +03:00
J. Nick Koston 1aeab65f56
Fix yeelight state when controlled outside of Home Assistant (#56964) 2021-10-03 00:08:31 -07:00
Alexei Chetroi d0827a9129
ZHA support for additional entities on ElectricalMeasurement ZCL cluster (#56909)
* Add electrical measurement type state attribute.

* Add active_power_max attribute

* Skip unsupported attributes on entity update

* Fix tests

* Create sensor only if the main attribute is supported

* Refactor ElectricalMeasurement sensor to use attr specific divisor and multiplier

* Multiple entities for electrical measurement cluster

* Update discovery tests

* Sensor clean up

* update tests

* Pylint
2021-10-02 21:57:49 -04:00
RenierM26 7d6b4a985d
Fix Switchbot unsupported SB types (#56928) 2021-10-02 13:51:53 -07:00
icemanch a95c6b10f7
Flux led config flow (#56354)
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-10-02 07:19:36 -10:00
Milan Meulemans 538773a14a
Add SSDP discovery to Nanoleaf (#56907) 2021-10-01 21:29:56 -10:00
Ville Skyttä 2730a27fd0
Use HTTPStatus instead of HTTP_* constants in various test mocks (#56543) 2021-10-01 15:52:45 -07:00
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