Commit Graph

12724 Commits (e874ba2a42d95b9312db9680023aa615f20bf542)

Author SHA1 Message Date
w35l3y beab6e2e5f
Fix ended session when there isn't any response from the user (#72218)
* Fix end session when there isn't any response

This PR fixes #72153

* Added test case as requested

https://github.com/home-assistant/core/pull/72218#discussion_r881584812
2022-06-03 15:32:22 +02:00
Raphaël Beamonte 88129dbe91
Allow `log` template function to return specified `default` on math domain error (#72960)
Fix regression for logarithm template
2022-06-03 15:27:10 +02:00
Joakim Plate 8910d265d6
Keep track of a context for each listener (#72702)
* Remove async_remove_listener

This avoids the ambuigity as to what happens if same callback is added multiple times.

* Keep track of a context for each listener

This allow a update coordinator to adapt what data to request on update from the backing service based on which entities are enabled.

* Clone list before calling callbacks

The callbacks can end up unregistering and modifying the dict while iterating.

* Only yield actual values

* Add a test for update context

* Factor out iteration of _listeners to helper

* Verify context is passed to coordinator

* Switch to Any as type instead of object

* Remove function which use was dropped earliers

The use was removed in 8bee25c938
2022-06-03 13:55:57 +02:00
Allen Porter 3a8a816584
Cleanup nest config flow tests to use common setup fixtures (#72878)
* Cleanup nest config flow tests to use common setup

* Remove some conditionals in test setup
2022-06-02 21:42:52 -07:00
J. Nick Koston 5b31414225
Fix misalignments between sql based filtering with the entityfilter based filtering (#72936) 2022-06-02 20:52:53 -07:00
Khole a4c3585448
Fix Hive authentication (#72929) 2022-06-02 14:54:26 -07:00
Erik Montnemery b97d346df7
Fix reload of MQTT yaml config (#72901) 2022-06-02 11:32:31 -07:00
J. Nick Koston d3b1896a06
Only present history_stats state as unknown if the time is in the future (#72880) 2022-06-02 08:39:53 -07:00
J. Nick Koston f1a31d8d33
Add support for async_remove_config_entry_device to unifiprotect (#72742)
* Add support for async_remove_config_entry_device to unifiprotect

* tweaks

* tweaks

* more cleanups

* more cleanups

* fix unhelpful auto import

* add coverage

* fix mac formatting

* collapse logic
2022-06-02 08:26:08 -07:00
Matrix 9192d0e972
Bump yolink-api to 0.0.6 (#72903)
* Bump yolink-api to 0.0.6

* update testcase
2022-06-02 17:21:22 +02:00
Jan Bouwhuis 52561ce076
Update MQTT tests to use the config entry setup (#72373)
* New testframework and tests for fan platform

* Merge test_common_new to test_common

* Add alarm_control_panel

* Add binary_sensor

* Add button

* Add camera

* Add climate

* Add config_flow

* Add cover

* Add device_tracker_disovery

* Add device_trigger

* Add diagnostics

* Add discovery

* Add humidifier

* Add init

* Add lecacy_vacuum

* Add light_json

* Add light_template

* Add light

* Add lock

* Add number

* Add scene

* Add select

* Add sensor

* Add siren

* Add state_vacuum

* Add subscription

* Add switch

* Add tag

* Add trigger

* Add missed tests

* Add another missed test

* Add device_tracker

* Remove commented out code

* Correct tests according comments

* Improve mqtt_mock_entry and recover tests

* Split fixtures with and without yaml setup

* Update fixtures manual_mqtt

* Update fixtures mqtt_json

* Fix test tasmota

* Update fixture mqtt_room

* Revert fixture changes, improve test

* re-add test
2022-06-02 14:24:46 +02:00
Guido Schmitz 219200b340
Fix test_hass_stop in devolo Home Network (#72833)
Fix test_hass_stop
2022-06-02 13:59:29 +02:00
Marc Mueller 62a5854e40
Fix bare except (#72906) 2022-06-02 13:58:04 +02:00
Raman Gupta 6ccaf33bdf
Attempt to fix flaky tomorrowio test (#72890)
* Fix flaky tomorrowio test

* reset mock outside context manager

* add to hass outside of context manager
2022-06-02 03:16:00 -04:00
J. Nick Koston f79e5e002b
Ensure recorder shuts down when its startup future is canceled out from under it (#72866) 2022-06-01 22:13:09 -07:00
J. Nick Koston c6e56c26b3
Fix logbook not setting up with an recorder filter that has empty fields (#72869) 2022-06-01 22:12:00 -07:00
Aidan Timson 2ba45a9f99
System Bridge 3.x.x (#71218)
* Change to new package and tcp

* Rework integration pt1

* Show by default

* Handle auth error

* Use const

* New version avaliable (to be replaced in future by update entity)

* Remove visible

* Version latest

* Filesystem space use

* Dev package

* Fix sensor

* Add services

* Update package

* Add temperature and voltage

* GPU

* Bump package version

* Update config flow

* Add displays

* Fix displays connected

* Round to whole number

* GPU fan speed in RPM

* Handle disconnections

* Update package

* Fix

* Update tests

* Handle more errors

* Check submodule and return missing uuid in test

* Handle auth error on config flow

* Fix test

* Bump package version

* Handle key errors

* Update package to release version

* Client session in config flow

* Log

* Increase timeout and use similar logic in config flow to init

* 30 secs

* Add test for timeout error

* Cleanup logs

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

* Update tests/components/system_bridge/test_config_flow.py

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

* uuid raise specific error

* Type

* Lambda to functions for complex logic

* Unknown error test

* Bump package to 3.0.5

* Bump package to 3.0.6

* Use typings from package and pydantic

* Use dict()

* Use data listener function and map to models

* Use passed module handler

* Use lists from models

* Update to 3.1.0

* Update coordinator to use passed module

* Improve coordinator

* Add debug

* Bump package and avaliable -> available

* Add version check

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-06-01 23:54:22 +02:00
Rami Mosleh 74e2d5c5c3
Remove deprecated YAML for `transmission` (#72832) 2022-06-01 17:25:49 +02:00
epenet 4c7837a576
Enforce type hints for config_flow (#72756)
* Enforce type hints for config_flow

* Keep astroid migration for another PR

* Defer elif case

* Adjust tests

* Use ancestors

* Match on single base_class

* Invert for loops

* Review comments

* slots is new in 3.10
2022-06-01 13:09:53 +02:00
J. Nick Koston 5d2326386d
Fix logbook spinner never disappearing when all entities are filtered (#72816) 2022-06-01 12:33:46 +02:00
J. Nick Koston d8b0376942
Fix purge of legacy database events that are not state changed (#72815) 2022-06-01 11:56:06 +02:00
epenet 1aeba8a9bd
Use Mapping for async_step_reauth in discord (#72812)
* Fix tests

* Cleanup code accordingly
2022-06-01 09:44:22 +02:00
Erik Montnemery 9ac0c5907f
Add test for mikrotik device tracker with numerical device name (#72808)
Add mikrotik test for numerical device name
2022-06-01 09:39:56 +02:00
Marc Mueller 4902af2f4e
Fix conftest for pylint plugin (#72777) 2022-06-01 09:22:47 +02:00
epenet a6db25219d
Use Mapping for async_step_reauth in motioneye (#72769) 2022-06-01 06:58:29 +02:00
Raman Gupta 394442e8a9
Use device_id for zwave_js/replace_failed_node command (#72785) 2022-06-01 06:42:07 +02:00
Erik Montnemery 44f332ed5f
Improve cast HLS detection (#72787) 2022-05-31 20:35:56 -07:00
Michael 3258d572b0
Add re-auth flow to Tankerkoenig (#72682)
* add reauth flow

* add test

* use Mapping for async_step_reauth arguments

* only update changed data

* improve tests

* use different api key to test reauth
2022-05-31 23:46:12 +02:00
J. Nick Koston c365454afb
Revert "Initial orjson support (#72754)" (#72789)
This was causing the wheels to fail to build. We need
to workout why when we don't have release pressure

This reverts commit d9d22a9556.
2022-05-31 13:51:55 -07:00
J. Nick Koston 35ee4ad55b
Prevent live logbook from sending state changed events when we only want device ids (#72780) 2022-05-31 13:08:04 -07:00
J. Nick Koston d9d22a9556
Initial orjson support (#72754) 2022-05-31 12:18:11 -07:00
Malte Franken 638992f9c4
Make zone condition more robust by ignoring unavailable and unknown entities (#72751)
* ignore entities with state unavailable or unknown

* test for unavailable entity
2022-05-31 11:34:52 -07:00
Khole a53aaf696c
Fix hive authentication process (#72719)
* Fix hive authentication process

* Update hive test scripts to add new data
2022-05-31 08:55:00 -07:00
Erik Montnemery 78cb0e24bc
Improve integration sensor's time unit handling (#72759) 2022-05-31 15:51:38 +02:00
Martin Hjelmare 8140ed724c
Remove mysensors yaml (#72761) 2022-05-31 15:22:31 +02:00
epenet cf17169b0e
Refactor type-hint pylint plugin (#72692)
* Cleanup unused variable

* Adjust tests

* Refactor _METHOD_MATCH dict

* Remove duplicate function

* Early exit

* Undo object hint

* METHOD > FUNCTION

* Add comment

* Remove extend

* Remove break

* Extract __any_platform__

* Add tests

* Cache _PLATFORMS

* Adjust tests

* Review comments

* mypy

* shorthand
2022-05-31 11:20:31 +02:00
epenet ca5f13b576
Allow removing a onewire device (#72710) 2022-05-31 10:40:08 +02:00
Erik Montnemery 635d7085cf
Move MQTT config schemas and client to separate modules (#71995)
* Move MQTT config schemas and client to separate modules

* Update integrations depending on MQTT
2022-05-31 09:32:44 +02:00
Paulus Schoutsen 99f3ca1f08
Add support for announce to play_media (#72566) 2022-05-30 20:41:05 -07:00
J. Nick Koston f9bd384e6c
Stop waiting for setup retry upon discovery (#72738) 2022-05-30 20:24:34 -07:00
J. Nick Koston 587fd05603
Make logbook inherit the recorder filter (#72728) 2022-05-30 17:34:32 -07:00
Duco Sebel 59f155b482
Fix homewizard diagnostics and add tests (#72611) 2022-05-30 14:37:28 -07:00
J. Nick Koston 3399be2dad
Retry bond setup when zeroconf discovery happens (#72687) 2022-05-30 18:41:07 +02:00
epenet 640f53ce21
Remove YAML configuration from upnp (#72410) 2022-05-30 17:07:18 +02:00
epenet 57ed667257
Remove YAML configuration from nzbget (#72424) 2022-05-30 16:46:55 +02:00
jjlawren 30e71dd96f
Add support for Sonos loudness switch (#72572) 2022-05-30 16:09:14 +02:00
Rami Mosleh dd5b1681e7
Remove YAML configuration from mikrotik (#72581) 2022-05-30 15:34:28 +02:00
Erik Montnemery 84243cf560
Tweak MQTT hassio discovery flow (#72699) 2022-05-30 14:25:36 +02:00
Erik Montnemery 342ccb5bf1
Improve handling of MQTT overridden settings (#72698)
* Improve handling of MQTT overridden settings

* Don't warn unless config entry overrides yaml
2022-05-30 14:21:20 +02:00
Joakim Sørensen 3a0111e65d
Use supervisor envs instead of hassio (#72601) 2022-05-30 12:00:13 +02:00
Erik Montnemery c8f677ce4c
Bump hatasmota to 0.5.1 (#72696) 2022-05-30 11:40:36 +02:00
J. Nick Koston 1c334605b6
Enable strict typing to emulated_hue (#72676)
* Add typing to emulated_hue part 2

* cleanups

* adjust targets in test
2022-05-30 08:49:37 +02:00
BigMoby 6e355e1074
iAlarm XR integration refinements (#72616)
* fixing after MartinHjelmare review

* fixing after MartinHjelmare review conversion alarm state to hass state

* fixing after MartinHjelmare review conversion alarm state to hass state

* manage the status in the alarm control

* simplyfing return function
2022-05-30 08:26:05 +02:00
Michael 1ed7e226c6
Address late review comments for Tankerkoenig (#72672)
* address late review comment from #72654

* use entry_id instead of unique_id

* remove not needed `_hass` property

* fix skiping failing stations

* remove not neccessary error log

* set DeviceEntryType.SERVICE

* fix use entry_id instead of unique_id

* apply suggestions on tests

* add return value also to other tests

* invert data check to early return user form
2022-05-29 20:57:47 +02:00
Shawn Saenger 1d57626ff0
Incorporate various improvements for the ws66i integration (#71717)
* Improve readability and remove unused code

* Remove ws66i custom services. Scenes can be used instead.

* Unmute WS66i Zone when volume changes

* Raise CannotConnect instead of ConnectionError in validation method

* Move _verify_connection() method to module level
2022-05-29 18:33:33 +02:00
Raman Gupta 5031c3c8b4
Fix zwave_js custom trigger validation bug (#72656)
* Fix zwave_js custom trigger validation bug

* update comments

* Switch to ValueError

* Switch to ValueError
2022-05-29 18:30:00 +02:00
Raman Gupta 92be8b4f8e
Make tomorrowio API rate limit handling more robust (#70412)
* Use the max request limit when setting tomorrowio update interval

* tests

* reduce lines

* simplify

* refactor

* Make Coordinator.async_setup_entry more efficient at determining when to refresh data and schedule refresh

* clean up

* clean up

* Remove unnecessary type definition

* typo

* fix logic ot be more deterministic

* Another fix

* Comment

* Reduce wasted API calls by doing partial updates when new entries get added with a new key

* Simplify and use asyncio event so that config entries only load after initial coordinator refresh

* Remove commented out piece

* Comment

* Remove unnecessary variable

* More cleanup

* Make future merge easier

* remove dupe

* switch order

* add comment

* Remove unnecessary error handling

* make code easier to read

* review feedback for code

* Fix logic

* Update test based on review

* Tweak comments

* reset mock so asertions are more clear

* Remove update interval check
2022-05-29 18:29:21 +02:00
J. Nick Koston 237ef6419b
Add basic typing to emulated_hue (#72663)
* Add basic typing to emulated_hue

* type a few more places

* fixes

* numbers are always stringified

* numbers are always stringified

* coverage

* drop assert
2022-05-29 18:27:32 +02:00
Allen Porter e7e48cd9f6
Defer google calendar integration reload to a task to avoid races of reload during setup (#72608) 2022-05-28 20:28:22 -07:00
Paulus Schoutsen 6a3d2e54a2
Handle OAuth2 rejection (#72040) 2022-05-28 20:23:16 -07:00
J. Nick Koston 7d391846ff
Retry right away on discovery for WiZ (#72659) 2022-05-28 16:38:38 -10:00
Chris Talkington 46031aff8d
Avoid swallowing Roku errors (#72517) 2022-05-28 21:03:13 -05:00
G Johansson 24c34c0ef0
Strict typing Sensibo (#72454) 2022-05-28 13:26:50 -10:00
Michael a4f678e7c9
Manage stations via integrations configuration in Tankerkoenig (#72654) 2022-05-28 13:31:03 -07:00
Allen Porter a598cdfeb3
Don't import google calendar user pref for disabling new entities (#72652) 2022-05-28 12:51:40 -07:00
J. Nick Koston e0614953a2
Add support for async_remove_config_entry_device to homekit_controller (#72630) 2022-05-28 09:47:14 -10:00
J. Nick Koston 4a5679db08
Prevent config entries from being reloaded concurrently (#72636)
* Prevent config entries being reloaded concurrently

- Fixes Config entry has already been setup when
  two places try to reload the config entry at the
  same time.

- This comes up quite a bit:
  https://github.com/home-assistant/core/issues?q=is%3Aissue+sort%3Aupdated-desc+%22Config+entry+has+already+been+setup%22+is%3Aclosed

* Make sure plex creates mocks in the event loop

* drop reload_lock, already inherits
2022-05-28 10:49:55 +02:00
J. Nick Koston a43d47fa0b
Escape % and _ in history/logbook entity_globs, and use ? as _ (#72623)
Co-authored-by: pyos <pyos100500@gmail.com>
2022-05-27 14:38:29 -07:00
J. Nick Koston 040e120101
Fix recorder system health when the db_url is lacking a hostname (#72612) 2022-05-27 10:32:26 -07:00
Paulus Schoutsen a733b92389
Include provider type in auth token response (#72560) 2022-05-27 10:31:48 -07:00
Paulus Schoutsen d59258bd25
Revert "Add service entity context (#71558)" (#72610) 2022-05-27 10:30:40 -07:00
Erik Montnemery 47d0cc9b09
Update integrations to pass target player when resolving media (#72597) 2022-05-27 09:05:06 -07:00
Erik Montnemery f76afffd5a
Require passing target player when resolving media (#72593) 2022-05-27 08:40:55 -07:00
Erik Montnemery b6575aa66b
Minor cleanup of test integration's cover platform (#72598) 2022-05-27 17:53:49 +03:00
Erik Montnemery 5ca82b2d33
Migrate zha light to color_mode (#70970)
* Migrate zha light to color_mode

* Fix restoring color mode

* Correct set operations

* Derive color mode from group members

* Add color mode to color channel

* use Zigpy color mode enum

Co-authored-by: David Mulcahey <david.mulcahey@me.com>
2022-05-27 15:38:22 +02:00
jjlawren 9cd9d06bcc
Avoid network activity during Plex tests (#72499) 2022-05-27 09:46:22 +02:00
Paulus Schoutsen cbd0c8976b
Attach SSL context to SMTP notify and IMAP sensor (#72568) 2022-05-26 22:15:20 -07:00
J. Nick Koston a526b2b819
Add support for async_remove_config_entry_device to bond (#72511) 2022-05-26 18:15:56 -10:00
J. Nick Koston 049c06061c
Fix memory leak when firing state_changed events (#72571) 2022-05-26 20:54:26 -07:00
Raman Gupta 5e52b11050
Add additional data to zwave_js device statistics WS API (#72520)
* Add additional data to zwave_js device statistics WS API

* Rename variables

* fix logic

* correct typehint

* Update homeassistant/components/zwave_js/api.py

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

* black

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-05-26 19:21:50 -04:00
Raman Gupta d8295e2fad
Add logbook entries for zwave_js events (#72508)
* Add logbook entries for zwave_js events

* Fix test

* Update homeassistant/components/zwave_js/logbook.py

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

* Update homeassistant/components/zwave_js/logbook.py

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

* Update homeassistant/components/zwave_js/logbook.py

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

* Update homeassistant/components/zwave_js/logbook.py

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

* black

* Remove value updated event

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-05-26 19:20:05 -04:00
Paulus Schoutsen 86570fba19
Convert media player enqueue to an enum (#72406) 2022-05-26 13:57:00 -07:00
Erik Montnemery 0cca73fb23
Add hardkernel hardware integration (#72489)
* Add hardkernel hardware integration

* Remove debug prints

* Improve tests

* Improve test coverage
2022-05-26 13:15:44 -07:00
Paulus Schoutsen ff3374b4e0
Use modern WS API for auth integration + add auth provider type to refresh token info (#72552) 2022-05-26 13:06:34 -07:00
Jan Bouwhuis d092861926
Move manual configuration of MQTT device_tracker to the integration key (#72493) 2022-05-26 13:02:39 -07:00
jack5mikemotown b91a1c1b0a
Fix Google Assistant brightness calculation (#72514)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-05-26 13:01:23 -07:00
Erik Montnemery d1578aacf2
Improve raspberry_pi tests (#72557) 2022-05-26 21:41:17 +02:00
rappenze f82ec4d233
Address issues from late review in fibaro config flow tests (#72553) 2022-05-26 20:52:30 +02:00
Raman Gupta 3a998f1d46
Update node statistics for zwave_js device diagnostics dump (#72509) 2022-05-26 03:03:43 -04:00
Marcio Granzotto Rodrigues c1f62d03a0
Fix bond device state with v3 firmwares (#72516) 2022-05-25 18:12:43 -10:00
J. Nick Koston 3537fa1dab
Fix flux_led taking a long time to recover after offline (#72507) 2022-05-25 17:02:21 -10:00
J. Nick Koston bfa7693d18
Fixes for logbook filtering and add it to the live stream (#72501) 2022-05-25 15:17:08 -10:00
Allen Porter c181af92a2
Throw nest climate API errors as HomeAssistantErrors (#72474) 2022-05-25 13:00:48 -07:00
Erik Montnemery 2bc093a04d
Hardware integration MVP (#71677) 2022-05-25 20:39:15 +02:00
Raman Gupta fe3fa0ae17
Bump zwave-js-server-python to 0.37.0 (#72395) 2022-05-25 10:46:55 -07:00
Raman Gupta c8c4bf6c37
Bypass dynamic validation for zwave_js custom triggers (#72471) 2022-05-25 19:20:40 +02:00
Raman Gupta 9b40de18cd
Allow zwave_js/network_status WS API to accept device or entry ID (#72205)
* Allow zwave_js/network_status WS API to accept device or entry ID

* Fix based on upstream feedback

* Fixt ests

* Fixes
2022-05-25 12:49:04 -04:00
BigMoby 42c80dda85
Create iAlarmXR integration (#67817)
* Creating iAlarmXR integration

* fixing after review code

* fixing remaining review hints

* fixing remaining review hints

* updating underlying pyialarm library

* Creating iAlarmXR integration

* fixing after review code

* fixing remaining review hints

* fixing remaining review hints

* updating underlying pyialarm library

* fixing after iMicknl review

* Improving exception handling

* Updating pyialarmxr library

* fixing after merge dev

* fixing after iMicknl review

* Update CODEOWNERS

Co-authored-by: Ludovico de Nittis <git@denittis.one>

* fixing iot_class

* Update homeassistant/components/ialarmxr/config_flow.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* fixing after bdraco review

* Update homeassistant/components/ialarmxr/config_flow.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* reverting catching exception in setup step

* Update homeassistant/components/ialarmxr/__init__.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/ialarmxr/__init__.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* fixing after bdraco suggestions

* Update homeassistant/components/ialarmxr/alarm_control_panel.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/ialarmxr/alarm_control_panel.py

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>

* Update homeassistant/components/ialarmxr/config_flow.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/ialarmxr/config_flow.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/ialarmxr/__init__.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/ialarmxr/__init__.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/ialarmxr/utils.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* regenerate translation and rename function to async_get_ialarmxr_mac

* removing and collapsing unused error messages

* fixing tests

* improve code coverage in tests

* improve code coverage in tests

* improve code coverage in tests

* fixing retry policy with new pyalarmxr library

* snake case fix

* renaming integration in ialarm_xr

* renaming control panel name

Co-authored-by: Ludovico de Nittis <git@denittis.one>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Mick Vleeshouwer <mick@imick.nl>
2022-05-25 10:52:06 +02:00
Austin Mroczek 5b896b315e
Add TotalConnect options flow to auto-bypass low battery (#62458)
* rebase

* use bypass option in async_setup_entry

* add test for options flow

* default to False for AUTO_BYPASS

* fix bypass defaults
2022-05-25 10:49:53 +02:00
Guido Schmitz bf75cb3cc5
Improve tests of devolo_home_network (#71873)
* Improve tests

* Use entity_registry_enabled_by_default fixture
2022-05-25 10:36:09 +02:00
Lars 804c888098
Free color selection for Fritz!Smarthome lights (#66213)
* Fritz light free color selection

* Use setcolor as fallback

* better debug log message

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

* change if-clause

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2022-05-25 09:28:36 +02:00
Duco Sebel 88c49f034a
Use 'python-homewizard-energy' dependency for HomeWizard (#71781)
* Update requirement

* Remove aiohwenergy and use python-homewizard-energy

* Update test to work with python-homewizard-energy

* Bumb python-homewizard-energy to 1.0.3
2022-05-25 09:05:11 +02:00
Dave T ce477e65ce
Render template during stream_url test for generic camera (#69716) 2022-05-25 09:02:48 +02:00
Allen Porter 71bc650ac7
Stop updating google_calendars.yaml if it does not already exist (#72340)
* Stop updating google_calendars.yaml if it does not already exist

* Add additional test coverage to make CI pass

* Add test for no updates to google_calendar.yaml

* Add parameter to test for expecting write calls

* Missing call argument

* Remove conditional and replace with inline assert
2022-05-25 08:59:27 +02:00
RoboMagus c1ddde3764
Check if attributes are present in new_state before accessing them (#71967)
* Check if attributes are present in new_state before accessing them.

* Early return if new state is None|Unknown|Unavailable

* Removed whitespace at line endings. +black run

* Update test for coverage
2022-05-25 08:44:08 +02:00
Guido Schmitz 5dfeb1e02a
Allow removing devices in devolo_home_control (#72190)
Allow removing devices
2022-05-25 08:39:05 +02:00
Raman Gupta eb7a521232
Fix more typing for zwave_js (#72472)
* Fix more typing for zwave_js

* Revert one change

* reduce lines

* Fix tests
2022-05-25 07:50:25 +02:00
Robert Svensson e60b247b51
Simplify setup of deCONZ platforms (#72453) 2022-05-24 20:48:09 -07:00
Kevin Stillhammer e4cd04f936
Use length_util for here_travel_time (#72458) 2022-05-24 20:42:37 -07:00
Raman Gupta 352b7e86af
Move zwave_js node metadata comments to separate WS API cmd (#71513)
* Move zwave_js node metadata comments to separate WS API cmd

* fix pr
2022-05-24 22:11:43 -04:00
rforro db815a7504
ZHA Add entities for Lidl water valve quirk (#72307)
* init

* added timer number entity

* added write attribute button entity

* fixed missed errors

* minor changes & fixed failing test

* removed icon

* unit and icons
2022-05-24 19:56:03 -04:00
rforro 0c2f22d478
Add configurable zha switch entity (#71784)
* add configurable zha switch entity

* final zha configurable switch

* fix codecov

* replaced errorneous cluster with local quirk

* test fix

* minor changes
2022-05-24 19:43:35 -04:00
Martin Hjelmare f7475a5bdb
Clean zwave_js entity driver access (#72427) 2022-05-24 17:52:07 -04:00
rikroe cd769a55c2
Update BMW connected drive to async (#71827)
* Change BMW connected drive to async

* Fix coordinator exceptions, fix tests

* Fix using deprecated property

* Write HA state directly

* Remove code that cannnot throw Exceptions from try/except

* Use public async_write_ha_state

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

* Fix login using refresh_token if token expired

* MyPy fixes

* Fix pytest, bump dependency

* Replace OptionFlow listener with explicit refresh

* Remove uneeded async_get_entry

* Update test to include change on OptionsFlow

* Bump bimmer_connected to 0.9.0

* Migrate renamed entitity unique_ids

* Don't replace async_migrate_entries, add tests

* Rename existing_entry to existing_entry_id

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

* Update tests

* Import full EntityRegistry

* Fix comment

* Increase timeout to 60s

* Rely on library timeout

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-05-24 21:44:18 +02:00
epenet f33151ff8b
Adjust config-flow type hints in unifi (#72411)
* Adjust config-flow type hints in unifi

* Use mapping

* Use mapping

* Fix tests

* Fix tests

* Revert "Use mapping"

This reverts commit 126fedc848.
2022-05-24 21:42:11 +02:00
Steven Looman 2e36a79357
Changes after late upnp review (#72241)
* Changes after review of #70008, part 1

* Changes after review from #70008

* Revert to UpnpDataUpdateCoordinator._async_update_data
2022-05-24 21:37:37 +02:00
epenet 6245d28907
Remove YAML configuration from vicare (#72408) 2022-05-24 20:28:09 +02:00
Franck Nijhof 652892e535
Do not swallow WLED errors (#72407) 2022-05-24 16:30:41 +02:00
Robert Svensson dc0d065901
Fix UniFi device tracker on controllers only reporting events (#72240)
Add events to UniFi client tracker in case controller does not report proper data
2022-05-24 16:06:30 +02:00
Erik Montnemery 23bd64b7a2
Prevent duplication of statistics metadata (#71637)
* Prevent duplication of statistics metadata

* Add models_schema_28.py

* Handle entity renaming as a recorder job

* Improve tests
2022-05-24 15:34:46 +02:00
epenet cc162bf691
Remove YAML configuration from Jandy iAqualink (#72404) 2022-05-24 10:49:05 +02:00
Paulus Schoutsen 3cd398a5bd
Warn for old Google SDK version (#72403) 2022-05-24 10:26:25 +02:00
Eric Severance f0b9aa7894
Bump pywemo==0.8.1 (#72400) 2022-05-24 09:53:01 +02:00
J. Nick Koston 1c25e1d7b1
Add metadata to logbook live stream websocket endpoint (#72394) 2022-05-23 22:37:47 -07:00
J. Nick Koston 9d95b9ab05
Chunk large logbook queries and add an end_time to the api so we stop sending events (#72351) 2022-05-23 15:40:00 -07:00
J. Nick Koston 0248a8710f
Always pass the source of the trigger for logbook context messages (#72333) 2022-05-23 13:35:45 -05:00
Allen Porter f6370d0522
Add Honeywell Lyric application credentials platform and deprecate configuration in yaml (#72335)
Add Honeywell Lyric application credentials platform and deprecate config yaml
2022-05-23 20:16:21 +02:00
Kevin Stillhammer 90e5d69184
Add template as_timedelta (#71801) 2022-05-23 19:32:22 +02:00
Eric Severance 92582beeff
Use properties of wemo Maker device (#72378) 2022-05-23 19:28:16 +02:00
Eric Severance e2a80e7a45
Remove unnecessary class from wemo test_fan (#72377) 2022-05-23 19:02:42 +02:00
epenet f25663067c
Enforce type hints on device_automation platform (#72126) 2022-05-23 18:51:40 +02:00
Joakim Sørensen f90effc299
Add agent version to Supervisor system health (#72360)
Co-authored-by: Stefan Agner <stefan@agner.ch>
2022-05-23 09:22:49 -07:00
Guido Schmitz 5b4fdb081e
Add climate tests for devolo_home_control (#72230) 2022-05-23 17:24:28 +02:00
Kevin Stillhammer 967f4efc56
Cleanup config flow and tests for here_travel_time (#72364) 2022-05-23 16:50:05 +02:00
Jan Bouwhuis d0556e6dd1
Move manual configuration of MQTT sensor to the integration key (#72276)
Add sensor
2022-05-23 16:29:45 +02:00
Robert Hillis 204e26a1b5
Warn user if Steam friends list is restricted (#72285) 2022-05-23 16:11:17 +02:00
Allen Porter dc76cce96b
Add SENZ application credentials platform (#72338) 2022-05-23 14:44:45 +02:00
Kevin Stillhammer 9763b44357
Remove uneeded patch statements in here_travel_time (#72361) 2022-05-23 14:38:40 +02:00
mkmer 071f6d7099
Aladdin connect unload cleanup (#71948) 2022-05-23 14:13:21 +02:00
Bouwe Westerdijk e17a653cf0
Bump plugwise to v0.18.4 (#72263) 2022-05-23 10:59:10 +02:00
Jan Bouwhuis bc6451bd64
Move manual configuration of MQTT select to the integration key (#72274)
Add select

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-23 10:08:44 +02:00
Jan Bouwhuis 673f43fbec
Move manual configuration of MQTT scene to the integration key (#72273)
Add scene

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-23 09:04:03 +02:00
Eric Severance cf5e21a996
Use properties of wemo Insight device (#72316) 2022-05-23 08:43:42 +02:00
Jan Bouwhuis c4893f96f6
Move manual configuration of MQTT siren to the integration key (#72278)
Add siren
2022-05-23 08:08:08 +02:00
Jan Bouwhuis 623abb1147
Move manual configuration of MQTT number to the integration key (#72272)
Add number
2022-05-23 08:03:09 +02:00
uvjustin c2612d1ade
Remove cache control headers from stream (#71996) 2022-05-23 13:56:26 +08:00
uvjustin 79fb5e1bec
Add use wallclock as timestamps option to onvif (#71983) 2022-05-23 13:54:49 +08:00
J. Nick Koston 4dbc1ed7a7
Add dialect (database engine) and version to recorder system health data (#72339) 2022-05-22 21:29:30 -07:00
Kevin Stillhammer 7649adde5f
Fix here_travel_time config_flow import (#72313)
* Handle import of entity_namespace

* Update homeassistant/components/here_travel_time/config_flow.py

Co-authored-by: Allen Porter <allen.porter@gmail.com>

* Fix mypy

Co-authored-by: Allen Porter <allen.porter@gmail.com>
2022-05-22 18:41:54 -07:00
Allen Porter 39ce25f76d
Add Withings application_credentials platform (#71990)
* Add Withings application_credentials platform

* Update withings auth implementation
2022-05-22 14:30:57 -07:00
Allen Porter e6ffae8bd3
Deprecate google calendar configuration.yaml (#72288)
* Deprecate google calendar configuration.yaml

* Remove unused translations

* Enable strict type checking and address pr feedback

* Move default hass.data init to `async_setup`
2022-05-22 14:29:11 -07:00
J. Nick Koston 9c3f949165
Add live streaming logbook websocket endpoint (#72258)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-05-22 14:57:54 -05:00
Andre Lengwenus ead6e7da1f
Purge entity and device registries when importing lcn from configuration.yaml (#54266)
* Identify LCN orphans in entity registry and device registry and remove them

* Fix typing issues

* Revert "Fix typing issues"

This reverts commit eccd067b3b5f23135e6c8a79d25f7f2cbc2d0ae9.

* Fix removal of devices which do not belong to given config_entry

* Use helper for getting entities for config_entry

* Rename variable
2022-05-22 18:59:44 +02:00
Jan Bouwhuis 4153edbcdd
Move manual configuration of MQTT humidifier to the integration key (#72270)
Add humidifier
2022-05-22 13:07:49 +02:00
Jan Bouwhuis 3c3e394972
Move manual configuration of MQTT cover to the integration key (#72268)
Add cover

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-22 13:07:14 +02:00
Jan Bouwhuis 87d895929f
Move manual configuration of MQTT switch to the integration key (#72279)
Add switch

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-22 13:06:49 +02:00
Jan Bouwhuis e8664ce1ae
Move manual configuration of MQTT climate to the integration key (#72251)
Add climate

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-22 11:28:10 +02:00
Jan Bouwhuis d1afbbfb09
Move manual configuration of MQTT vacuum to the integration key (#72281)
Add vacuum

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-22 11:27:25 +02:00
Christopher Bailey 654c59c194
Add diagnostics for UniFi Protect (#72280) 2022-05-21 18:35:27 -05:00
xLarry abf9aab18f
Add laundrify integration (#65090)
* First version of laundrify integration

* Code cleanup

* Code cleanup after review #2

* Move coordinator to its own file

* Save devices as dict and implement available prop as fn

* Validate token on init, abort if already configured

* Some more cleanup after review

* Add strict type hints

* Minor changes after code review

* Remove OptionsFlow (use default poll interval instead)

* Fix CODEOWNERS to pass hassfest job

* Fix formatting to pass prettier job

* Fix mypy typing error

* Update internal device property after fetching data

* Call parental update handler and remove obsolete code

* Add coordinator tests and fix some config flow tests

* Refactor tests

* Refactor fixtures

* Device unavailable if polling fails
2022-05-21 15:18:01 -04:00
Allen Porter 3f8c896cb2
Set user friendly name for Google Calendar config entry (#72243)
* Set user friendly name for Google Calendar config entry

* Add a new auth implementation for use during the config flow
2022-05-21 20:22:27 +02:00
Jan Bouwhuis 17669a728c
Move manual configuration of MQTT lock to the integration key (#72271)
Add lock
2022-05-21 19:07:26 +02:00
Jan Bouwhuis 809808dd80
Move manual configuration of MQTT camera to the integration key (#72249)
Add camera

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-21 19:04:36 +02:00
Kevin Stillhammer f1ac9f8cca
Add ConfigFlow for here_travel_time (#69212)
* Add ConfigFlow for here_travel_time

* Use Selectors and Menu

* Use separate config flow steps for menus

* Move time options together

* Update homeassistant/components/here_travel_time/config_flow.py

Co-authored-by: Allen Porter <allen.porter@gmail.com>

* Blacken config_flow

* Initialize _config

* Only catch HERE errors

* Fix unknown error test

* Implement async_step_import

* Only catch errors for validate_api_key

* Split lat/lon

* Add additional test coverage

* Use TimeSelector in option flow

* Assert config entry data/option

Co-authored-by: Allen Porter <allen.porter@gmail.com>
2022-05-21 07:36:02 -07:00
Jan Bouwhuis 17588c39a4
Move manual configuration of MQTT binary_sensor to the integration key (#72183)
Add binary_sensor

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-21 16:14:24 +02:00
Jan Bouwhuis 3918059033
Move manual configuration of MQTT button to the integration key (#72167)
Add button

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-21 09:54:51 +02:00
Christopher Bailey 267266c7c3
Adds UP Chime support for UniFi Protect (#71874)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-05-20 15:16:01 -05:00
jrester ad5dbae425
Fix reauthentication for powerwall integration (#72174) 2022-05-20 14:53:43 -05:00
J. Nick Koston e9c861f2b2
Add support for cover positions in bond (#72180) 2022-05-20 07:49:26 -07:00
Allen Porter 775be354a6
Cleanup nest async methods that do not need to actually await (#72170)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-05-20 07:47:18 -07:00
J. Nick Koston d459a5c66e
Include context state in logbook responses to improve localization (#72222)
* Include context state in logbook responses to improve localization

* reduce payload, dont send context_event_type if sending context_state
2022-05-20 07:46:01 -07:00
Shay Levy 74e8b076e5
Fix Shelly missing key config flow (#72116) 2022-05-20 12:05:53 +03:00
Jan Bouwhuis 654b095498
Move manual configuration of MQTT alarm control panel to the integration key (#72165)
Add alarm_control_panel
2022-05-20 08:37:53 +02:00
Raman Gupta 5f7594268a
Switch zwave_js firmware upload view to use device ID (#72219)
* Switch zwave_js firmware upload view to use device ID

* Store device registry in view
2022-05-20 01:50:13 -04:00
J. Nick Koston 7cad1571a2
Describe hue events in the logbook (#72220)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-05-19 22:21:09 -07:00
Allen Porter c028db00de
Add Neato application credentials platform and deprecate configuration.yaml (#72175) 2022-05-19 21:22:37 -07:00
J. Nick Koston 1001f9e39a
Fix last state in history minimal respones when all the states at the end are skipped (#72203) 2022-05-19 20:58:32 -07:00
Christopher Bailey 5c2c602686
Bumps pyunifiprotect to 3.6.0 (#72188) 2022-05-19 20:34:58 -05:00
Raman Gupta 68b278d170
Remove legacy zwave migration logic (#72206)
* Remove legacy zwave migration logic

* Update test_migrate.py
2022-05-19 18:29:28 -04:00
Raman Gupta 487819bbe5
Use device ID as input for zwave_js WS device cmds (#71667)
* Use device ID as input for zwave_js WS device cmds

* Additionally missed commands, update network_status command to include node status data

* revert change to removed function

* Revert register device change
2022-05-19 13:31:24 -04:00
J. Nick Koston 1c4c0f1eb3
Small fixes and cleanups to legacy nexia code (#72176) 2022-05-19 11:50:54 -05:00
J. Nick Koston f06f94ea85
Add coverage to ensure we reject 0 length logbook filters (#72124) 2022-05-19 08:59:06 -07:00
Jan Bouwhuis ed1c2ea2b8
Move manual configuration of MQTT fan and light to the integration key (#71676)
* Processing yaml config through entry setup

* Setup all platforms

* Update homeassistant/components/mqtt/__init__.py

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

* adjust mock_mqtt - reference config from cache

* Fix test config entry override

* Add tests yaml setup

* additional tests

* Introduce PLATFORM_SCHEMA_MODERN

* recover temporary MQTT_BASE_PLATFORM_SCHEMA

* Allow extra key in light base schema, restore test

* Fix test for exception on platform key

* One deprecation message per platform

* Remove deprecation checks from modern schema

* Update homeassistant/components/mqtt/fan.py

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

* Update homeassistant/components/mqtt/fan.py

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

* Update homeassistant/components/mqtt/light/__init__.py

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

* Update homeassistant/components/mqtt/light/__init__.py

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

* Update homeassistant/components/mqtt/light/schema_json.py

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

* Update homeassistant/components/mqtt/light/schema_template.py

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

* Update homeassistant/components/mqtt/mixins.py

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

* rename validate_modern_schema

* Do not fail platform if a single config is broken

* Update homeassistant/components/mqtt/__init__.py

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

* Fix tests on asserting log

* Update log. Make helper transparant, remove patch

* Perform parallel processing

* Update tests/components/mqtt/test_init.py

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

* Apply suggestions from code review

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

* Update homeassistant/components/mqtt/mixins.py

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

* black

* Fix tests and add #new_format anchor

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-19 15:04:53 +02:00
Franck Nijhof 9d377aabdb
Fix Google tests (#72158) 2022-05-19 14:11:29 +02:00
starkillerOG f7b96c87d0
Netgear test coverage (#72150) 2022-05-19 13:06:56 +02:00
starkillerOG 9be7b02613
Fix Motion Blinds checking interface for multiple gateways (#71474)
* fix checking interface for multiple gateways

* fix black

* setup lock for shared multicast listener

* fix black

* bump motionblinds to 0.6.7

* compensate for extra Lock_key

* unregister gateway when unloading

* unsubscribe stop listener

* fix black

* only unsubscribe listener on last gateway remove

* catch OSError for invalid interfaces

* test coverage

* make stop listen on last config entry more robust

* also check ConfigEntryState

* fix black
2022-05-19 10:36:22 +02:00
J. Nick Koston 272e65f56d
Fix device_ids being filtered when entities also specified in the logbook (#72122) 2022-05-18 23:27:31 -05:00
Allen Porter a6402697bb
Add display name for application credentials (#72053)
* Add display name for application credentials

* Rename display name to name

* Improve test coverage for importing a named credential

* Add a default credential name on import
2022-05-18 21:02:30 -07:00
Erik Montnemery edd7a3427c
Remove support for databases without ROW_NUMBER (#72092) 2022-05-18 21:52:38 -05:00
J. Nick Koston d8a580a90f
Update nexia to use asyncio (#72108) 2022-05-18 18:08:02 -05:00
Simone Chemelli 4a95539d9d
Warn user if "model" key is missing from Shelly firmware (#71612)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-05-18 10:29:02 -07:00
J. Nick Koston c74b241949
Include initial state in history_stats count (#71952) 2022-05-18 10:28:04 -07:00
epenet 8f7f3f328e
Suppress Upnp error in SamsungTV resubscribe (#71925)
* Suppress Upnp error in SamsungTV resubscribe

* Supress UpnpCommunicationError instead

* Log resubscribe errors

* Add tests

* Add exc_info
2022-05-18 10:01:56 -07:00
J. Nick Koston bd78eec732
Fix reversed raise_on_progress in baf config_flow (#72094) 2022-05-18 17:42:14 +02:00
Erik Montnemery 037f6947d8
Fail recorder setup with unsupported dialect or version (#70888) 2022-05-18 16:52:46 +02:00
Allen Porter 26ee289be3
Add return code to integration application credentials in config flow (#71986)
* Add return code to integration application credentials in config flow

* Update google tests to use new return code

* Update spotify test for no auth configured

* Add translation for oauth2_missing_credentials

* Add new return code to yolink

* Update homeassistant/strings.json

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

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-05-18 06:30:57 -07:00
epenet 4eb46d45ca
Cleanup deprecated async_get_registry in tests (#72059) 2022-05-18 13:12:38 +02:00
epenet 8d57f70466
Ignore UpnpXmlContentError in SamsungTV (#72056) 2022-05-18 09:36:20 +02:00
J. Nick Koston c4fc84ec1e
Add support for selecting device_ids from the logbook (#72039)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-05-18 01:58:30 -05:00
J. Nick Koston 0dc12c70e3
Add logbook descriptions for elkm1 keypad press events (#72017)
* Add logbook descriptions for elkm1 keypad press events

* drop extra block
2022-05-18 08:47:02 +02:00