Commit Graph

6939 Commits (cf6352e93ccdf5c43800c482e5f455f660e576a2)

Author SHA1 Message Date
Robert Svensson 333f5da036
Use websocket fixture in deCONZ binary sensor tests (#47820)
Localize test data
Improve asserts
2021-03-18 09:51:42 +01:00
J. Nick Koston 08db262972
Add a service to reload config entries that can easily be called though automations (#46762) 2021-03-17 21:27:21 -07:00
corneyl 6fb0e49335
Upgraded aiopylgtv to v0.4.0 (#47014)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-03-17 20:59:48 -07:00
Tobias Haber f785cc7d9a
Google has deprecated a comma separated list for modes changed it to array (#48029) 2021-03-17 20:59:06 -07:00
J. Nick Koston dd56cc8010
Fix rest sensor data misalignment with multiple sensors (#48043)
If there were multiple rest data sources, the index needed
to be incremented by type instead of by data source/type
2021-03-17 22:47:42 +01:00
Matthew Donoughe 9011a54e7f
Switch history tests to pytest (#42318)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-17 15:32:44 +01:00
sycx2 009e44ed9b
Rewrite tests for Template Light (#41163) 2021-03-17 11:30:44 +01:00
Kevin Worrel d21d9951ba
Add Pentair ScreenLogic integration (#47933)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-03-16 13:32:02 -10:00
J. Nick Koston f605a3c149
Remove YAML support from August (#47615) 2021-03-16 13:22:07 -10:00
Abílio Costa d49a436573
Delay ZHA group updates to ensure all members are updated first (#46861)
* Delay ZHA group updates to ensure all members are updated first

After turning off a group, when the first device reports "off", the
other devices may still be "on". If HA processes the group state update
quickly enough, the group will see that some devices are on, so the
state of the group will revert back to "on", and then "off" when the
remaining devices all report "off". That would cause the UI toggle to go
back and forward quickly, and automations that trigger with "state: on"
to fire when the user turns the group off.

This PR fixes that by delaying the group state update, giving time for
all the devices to report their states first.

* Fix zha group tests

* Reorder sleeping.

* Update tests/components/zha/common.py

Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
2021-03-16 17:38:16 -04:00
Paulus Schoutsen f1c274b3dd
Add run_id to automation logbook event (#47980) 2021-03-16 14:37:26 -07:00
Matt Zimmerman 73c6728e98
Add binary_sensor entities for SmartTub reminders (#47583) 2021-03-16 17:38:09 +01:00
Klaas Schoute 0097169dd3
Add aliases to actions in automation blueprints (#47940) 2021-03-16 17:14:07 +01:00
David F. Mulcahey 673ebe2911
Guard extra call in ZHA lights (#47832)
* add flag to prevent sending an on command

* fix condition

* add constant for default transition

* make groups work with new force on flag

* reorder light entity creation

* rearrange logic

* update test

* remove failed attempt at group light flag

* fix flag
2021-03-16 10:02:26 -04:00
Erik Montnemery 9647eeb2e0
Add custom JSONEncoder for automation traces (#47942)
* Add custom JSONEncoder for automation traces

* Add tests

* Update default case to include type

* Tweak

* Refactor

* Tweak

* Lint

* Update websocket_api.py
2021-03-16 14:21:05 +01:00
Erik Montnemery 5f2326fb57
Add support for light color modes (#47720)
* Add support for light color modes

* Update tests

* Update comments

* Fix bugs, add tests

* Suppress lint errors

* Don't suppress brightness when state is ambiguous

* Improve reproduce_state + add tests

* Add comment

* Change COLOR_MODE_* constants, rename COLOR_MODE_DIMMER to COLOR_MODE_BRIGHTNESS

* Fix tests

* Tweaks
2021-03-16 12:51:39 +01:00
Erik Montnemery 333e6a215a
Add execute_script WS API (#47964)
* Add execute_script WS API

* Improve tests
2021-03-16 08:51:00 +01:00
Franck Nijhof 354c0a7fd1
Add reauthentication to Verisure (#47972)
* Add reauthentication to Verisure

* Update translations

* Correct translation step key

* Address pylint warning

* = is not :
2021-03-16 08:41:41 +01:00
Erik Montnemery f82e59c32a
Make it possible to list debug traces for a specific automation (#47744) 2021-03-15 16:51:04 -07:00
Martin Hjelmare 40c12997ed
Add zwave_js sensor humidity device class (#47953) 2021-03-15 20:51:24 +01:00
Franck Nijhof 059e9e8307
Add config flow to Verisure (#47880)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-03-15 12:30:44 -07:00
RadekHvizdos 9f4c2f6260
Add suggested_area to MQTT discovery (#47903)
* Add suggested_area to MQTT Discovery

This adds suggested_area to MQTT discovery, so that the discovered devices could be automatically added to the proper area.

* Add abbreviation for MQTT suggested_area

* Remove extra whitespace

* Remove extra whitespace #2

* Added tests for MQTT Dicovery of suggested_area

* Fix test for MQTT suggested_area

* Better tests of MQTT suggested_area

Changes made as per feedback from @emontnemery
2021-03-15 20:02:02 +01:00
J. Nick Koston 28c80c1133
Ensure recorder purge tests can handle multiple purge cycle (#47956)
Since a purge can generate another purge task, we now wait for
three recorder queue completions by default.
2021-03-15 11:19:19 -07:00
Nathan Tilley 93c38551d3
Implement Wake On Lan Dummy State (#47719)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-15 17:20:47 +01:00
Andre Lengwenus 50b7b1cc7a
Migrate LCN configuration to ConfigEntry (Part 1) (#44090) 2021-03-15 13:45:13 +01:00
Tobias Sauerwein 6b98583bc1
Add tests for Netatmo climate (#46392)
* Add tests for Netatmo climate

* Add comments and fake webhook events

* Split tests

* Split tests

* Clean up

* Fix coveragerc

* Fix requirements

* Remove freezegun dependency

* Move async_block_till_done to

* Call async_handle_webhook directly

* Use async_handle_webhook directly p2

* Exclude helper.py from

* Remove assertion of implementation details

* Use the webhook integration handler

* Extract function
2021-03-15 12:45:36 +01:00
Khole cfeb8eb06a
Add Hive config flow (#47300)
* Add Hive UI

* Fix tests and review updates

* Slimmed down config_flow

* Fix tests

* Updated Services.yaml with extra ui attributes

* cleanup config flow

* Update config entry

* Remove ATTR_AVAILABLE

* Fix Re-Auth  Test

* Added more tests.

* Update tests
2021-03-15 12:27:10 +01:00
Drzony 99d1e3e71d
MQTT Light: Use flash attribute in async_turn_off (#47919) 2021-03-15 11:24:07 +01:00
Paulus Schoutsen 7fe3c472e9
Improve bad JSON data reporting (#47932)
* Improve bad data reporting

* Fix tests

Co-authored-by: Erik <erik@montnemery.com>
2021-03-15 10:41:25 +01:00
Brandon Rothweiler fbf3225234
Address review comments and minor fix for Mazda integration (#47702)
* Address comments from code review

* Fix handling of missing sensor values

* Use default timeout for get_vehicles

* Fix test_update_auth_failure
2021-03-15 06:57:39 +01:00
Allen Porter bcadccf7aa
Invalidate HLS Stream on nest url refresh failure (#47869)
This will ensure that the HLS stream is re-created and fetches a new url.
2021-03-14 22:49:21 -07:00
J. Nick Koston 15aa00d6cc
Fix homekit checking for port cleanup too many times (#47836)
* Fix homekit checking for port cleanup too many times

The loop should have terminated as soon as the port was available

* coverage

* tweak homekit shutdown wait
2021-03-15 05:14:46 +01:00
J. Nick Koston 61a2460c87
Improve error reporting in recorder purge test (#47929) 2021-03-14 19:46:21 -07:00
Martin Hjelmare c53a462b3d
Fix zwave_js preset mode lookup (#47851) 2021-03-13 22:27:05 +01:00
Raman Gupta c7b9a0715d
Fix zwave_js preset supported feature (#47819) 2021-03-13 12:43:03 +01:00
Allen Porter 02a82d3f00
Add timeouts in stream tests to prevent possible hangs (#47545)
* Add timeouts on recving packets

Add a timeout when recving packets from the worker thread in case it hangs.
Add an exit condition just in case the while loop goes on forever.

* Add a timeout to recorder thread join.

* Wait for recorder thread to be invoked in tests

Remove the while loop and instead wait for segments to be produced by the background worker thread.

* Allow worker to resume before stopping to fix timeouts

* Lower test timeout further

* Remove test_stream_ended since it is flaky

This test doesn't really add additional value on top of other tests.
2021-03-13 01:53:26 -08:00
Erik Montnemery 2178e27fb4
Fix unclean shutdown of recorder test (#47791) 2021-03-12 14:17:27 -08:00
Robert Svensson 786cbcc1d6
Introduction of deCONZ websocket fixture (#47812) 2021-03-12 12:03:29 -08:00
Robert Svensson 6b03c8d126
Improve deCONZ init tests (#47825)
Use patch.dict rather than deep copy to change DECONZ_WEB_REQUEST
2021-03-12 12:02:15 -08:00
Robert Svensson 597bf67f5a
UniFi has changed to not report uptime in epoch form (#47492) 2021-03-12 11:55:11 -08:00
Mick Vleeshouwer 9a98dcf432
Add HomeKit support for new CO / CO2 device class (#47737) 2021-03-12 09:03:47 -10:00
Charles Garwood 13cd2f52d8
Return property_key in zwave_js get_config_parameters websocket (#47808) 2021-03-12 13:49:59 -05:00
Erik Montnemery 3115bf9aab
Add temperature sensor for gogogate2 wireless door sensor (#47754)
* Add temperature sensor for gogogate2 wireless door sensor

* Chain sensor generators
2021-03-12 19:04:56 +01:00
Paulus Schoutsen 04b335afe9
Allow filtering the logbook by context_id (#47783) 2021-03-12 09:04:02 -08:00
Paulus Schoutsen ff94e920e4
Do not use AsyncTrackStates (#47255) 2021-03-11 23:18:09 -08:00
Paulus Schoutsen 2a22c54fcb
Store the correct context in the trace (#47785) 2021-03-12 08:12:26 +01:00
MatsNl fa0c544bf5
Improve Atag integration and bump version to 0.3.5.3 (#47778)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-03-11 22:15:45 -08:00
J. Nick Koston f4b775b125
Cleanup homekit and remove aid storage from hass.data (#47488) 2021-03-11 22:05:03 -08:00
Felipe Martins Diel 9ca0cd5464
Bump broadlink from 0.16.0 to 0.17.0 (#47779) 2021-03-11 21:34:56 -08:00
Marc Mueller 92852b9c10
Add apply_filter attribute to recorder.purge service (#45826) 2021-03-11 17:03:30 -10:00
Erik Montnemery 14ff6d4d1f
Update integrations p-s to override extra_state_attributes() (#47759) 2021-03-11 21:23:20 +01:00
Erik Montnemery 1fc8e32d86
Update integrations t-z to override extra_state_attributes() (#47760) 2021-03-11 20:16:26 +01:00
Erik Montnemery 14a59d290a
Update integrations j-o to override extra_state_attributes() (#47758) 2021-03-11 20:11:25 +01:00
Franck Nijhof 1095905f8c
Add DataUpdateCoordinator to Verisure (#47574) 2021-03-11 19:41:01 +01:00
Marc Mueller 10848b9bdf
Recorder improvements (#47739) 2021-03-11 07:52:07 -10:00
Erik Montnemery af4d06b12e
Update integrations f-i to override extra_state_attributes() (#47757) 2021-03-11 16:57:47 +01:00
Erik Montnemery 6c084ae6ce
Update integrations a-e to override extra_state_attributes() (#47756) 2021-03-11 16:51:03 +01:00
mtl010957 b162c45e0a
Cover Tilt Position Bugfix (#47682)
* Report tilt position properly when inverting using tilt_max < tilt_min

* Add warning per review comment

* Add test for inverted tilt position configuration

* Separate non-numeric and out of range warnings per review comment

* Fix out of range message and add tests for not numeric and out of range messages
2021-03-11 13:49:10 +01:00
Erik Montnemery b9c2f80cab
Fix light brightness_step on multiple entities (#47746)
* Fix light brightness_step on multiple entities

* Fix comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-11 11:46:32 +01:00
Paulus Schoutsen 00bd591238
Verify get_zones webhook works (#47741) 2021-03-11 01:08:12 +01:00
Erik Montnemery a9a9e1f199
Tweak automation tracing (#47721) 2021-03-10 14:42:13 -08:00
Álvaro Fernández Rojas ff09643b33
Add Tado weather support (#44807) 2021-03-10 10:31:37 -10:00
Franck Nijhof 10535018cc
Improve HomeKit discovered Hue config flow (#47729) 2021-03-10 11:20:51 -08:00
Paulus Schoutsen 3ad4c26f98
Allow SSDP discovery modern Hue hubs (#47725) 2021-03-10 19:21:51 +01:00
Mike Keesey 78c974d527
Refactor Harmony tests to better follow Home Assistant conventions (#47141) 2021-03-10 08:19:04 -10:00
Mick Vleeshouwer 461e766a93
Add device class CO2 to various integrations (#47676)
* Add device class CO2 to Fibaro

* Add device class CO2 to Awair

* Add device class CO2 to Tasmota

* Add device class CO2 to Netatmo

* Add device class CO2 to Ambient Station

* Update Tasmota tests

* Remove icon
2021-03-10 12:52:55 +01:00
Erik Montnemery 704000c049
Add support for breakpoints in scripts (#47632) 2021-03-09 21:23:11 -08:00
Franck Nijhof 62e49e545b
Add confirm only for Elgato (#47684) 2021-03-10 01:53:00 +01:00
Matt Zimmerman 7840db0598
Restore switch.turn_on and switch.turn_off functionality for SmartTub pumps (#47586)
Revert "Remove turn_on and turn_off from SmartTub pump switches (#47184)"

This reverts commit bab66a5cb9.
2021-03-10 01:26:54 +01:00
J. Nick Koston a060acc2b1
Fix recorder with MSSQL (#46678)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-03-09 11:16:19 -10:00
Paulus Schoutsen 46e593485e
Handle zeroconf updated events (#47683) 2021-03-09 10:14:00 -10:00
Erik Montnemery 84226da404
Update tests i-o to use async_get() instead of async_get_registry() (#47653) 2021-03-09 14:32:08 +01:00
Erik Montnemery 87e7cebd36
Update tests c-h to use registry async_get (#47652) 2021-03-09 14:31:17 +01:00
Erik Montnemery ba2978c693
Update tests p-s to use async_get() instead of async_get_registry() (#47654) 2021-03-09 14:28:32 +01:00
Erik Montnemery b3fecb1c95
Update tests t-z to use async_get() instead of async_get_registry() (#47655) 2021-03-09 14:25:03 +01:00
Erik Montnemery 78b21b1ad1
Update tests a-b to use async_get() instead of async_get_registry() (#47651) 2021-03-09 14:24:34 +01:00
Paulus Schoutsen 34b9e6f6fc
Shelly: set confirm only (#47608) 2021-03-09 13:13:43 +01:00
J. Nick Koston 5d7b53603f
Harmony: set confirm only (#47617) 2021-03-08 15:44:55 -08:00
J. Nick Koston 1dd35ff059
Catch dhcp setup permission errors sooner (#47639)
This solves an unexpected thread exception on macs when running as
a user intead of root
2021-03-08 15:15:22 -08:00
Raman Gupta 797ee81fc9
Update zwave_js supported features list to be static (#47623) 2021-03-08 15:11:54 -08:00
Diogo Gomes ee25723468
Add option to reverse switch behaviour in KMTronic (#47532) 2021-03-08 22:56:24 +01:00
Erik Montnemery a243adc551
Add WS command to get a summary of automation traces (#47557)
* Add WS command to get a summary of automation traces

* Update tests

* Correct rebase mistake, update tests
2021-03-08 20:30:52 +01:00
uvjustin d9bf63103f
Fix I-frame interval in stream test video (#47638) 2021-03-08 11:23:57 -08:00
J. Nick Koston 573c40cb11
Ensure bond devices recover when wifi disconnects and reconnects (#47591) 2021-03-08 10:44:28 -08:00
J. Nick Koston b315fcab11
Fix turn on without speed in homekit controller (#47597) 2021-03-08 10:43:22 -08:00
ollo69 32476a3fed
Fix AsusWRT wrong api call (#47522) 2021-03-08 10:34:12 -08:00
J. Nick Koston 53952b9662
Ensure template fan value_template always determines on state (#47598) 2021-03-08 18:34:34 +01:00
Erik Montnemery 8fe51b8ea7
Store automation traces indexed by run_id (#47509)
* Store traces indexed by run_id

* Format

* Add test

* Add test

* Clarify comment
2021-03-08 18:04:41 +01:00
Adam Ernst ad86eb4be3
Add support for Flo "pucks" (#47074)
So far the Flo integration only supports shutoff valves. Add support for Flo leak detector pucks, which measure temperature and humidity in addition to providing leak alerts.
2021-03-08 07:36:03 -05:00
Raman Gupta 1d387e12cc
Add fallback zwave_js entity name using node ID (#47582)
* add fallback zwave_js entity name using node ID

* add new fixture and test for name that was failing
2021-03-08 09:08:17 +01:00
Diogo Gomes d3bd2378ba
Correct weather entities forecast time (#47565) 2021-03-07 16:07:02 +01:00
Robert Svensson 48f1a55a28
Improve common structure in UniFi device tracker tests (#47526) 2021-03-07 13:20:04 +01:00
J. Nick Koston 2e89f152ba
Bump HAP-python to 3.4.0 (#47476)
* Bump HAP-python to 3.3.3

* bump

* fix mocking
2021-03-07 01:30:57 +01:00
Alexei Chetroi 79b5ca9415
Add device classes for CO and CO2 measurements (#47487) 2021-03-07 00:52:43 +01:00
Franck Nijhof b01a6367cc
Complete typing on AdGuard Home integration (#47477) 2021-03-06 23:19:03 +01:00
Nathan Spencer e9052233a6
Adjust litterrobot tests and code to match guidelines (#47060)
* Use SwitchEntity instead of ToggleEntity and adjust test patches as recommended

* Move async_create_entry out of try block in config_flow

* Patch pypi package instead of HA code

* Bump pylitterbot to 2021.2.6, fix tests, and implement other code review suggestions

* Bump pylitterbot to 2021.2.8, remove sleep mode start/end time from vacuum, adjust and add sensors for sleep mode start/end time

* Move icon helper back to Litter-Robot component and isoformat times on time sensors
2021-03-06 17:28:33 +01:00
uvjustin 14f85d8731
Disable audio stream when ADTS AAC detected (#47441)
* Disable audio stream when ADTS AAC detected

* Use context manager for memoryview

* Fix tests

* Add test

* Fix tests

* Change FakePacket bytearray size to 3
2021-03-06 16:40:49 +01:00
Paulus Schoutsen 4c181bbfe5
Raise error instead of crashing when template passed to call service target (#47467) 2021-03-05 15:34:18 -08:00
Franck Nijhof 8f31b09b55
Complete typing on TwenteMilieu integration (#47480) 2021-03-05 15:33:26 -08:00
ollo69 292f4262aa
Move AsusWrt sensors update logic in router module (#46606) 2021-03-05 23:40:04 +01:00
Robert Svensson 50d3aae418
Improve restoring UniFi POE entity state (#47148)
* Improve restoring data and better handling when the restore data is empty
Improve readability of some logic related to POE clients

* There is no need to check clients_all in Switch platform

* Add better tests when restoring state

* Port except handling shouldn't be needed anymore

* Walrusify get_last_state
2021-03-05 22:09:05 +01:00
Robert Svensson 793929f2ea
Increase test coverage of UniFi integration (#46347)
* Increase coverage of init

* Increase coverage of config_flow

* Improve coverage of controller

* Minor improvement to switch test

* Fix review comment

* Mock websocket class

* Replace the rest of the old websocket event tests

* Improve websocket fixture for cleaner tests

* Fix typing

* Improve connection state signalling based on Martins feedback

* Improve tests of reconnection_mechanisms based on Martins review comments

* Fix unload entry

* Fix isort issue after rebase

* Fix martins comment on not using caplog

* Fix wireless clients test

* Fix martins comments on wireless clients test
2021-03-05 21:28:41 +01:00
Emily Mills 7c08592b5a
Convert kulersky to use new async backend (#47403) 2021-03-05 14:24:55 -06:00
Emily Mills a547d0fea2
Prevent Zerproc leaving open unnecessary connections (#47401)
* Zerproc: Prevent leaving open unnecessary connections

* Fix config entry unloading
2021-03-05 13:14:03 -06:00
tkdrob 3baeed3684
Clean up constants (#47323) 2021-03-05 19:08:04 +01:00
Franck Nijhof cc99fd5e32
Fix Hue scene overriding Hue default transition times (#47454) 2021-03-05 09:43:26 -08:00
Martin Hjelmare 0350a6ed21
Only create snapshot if add-on update will be done (#47424) 2021-03-04 16:38:33 -08:00
Raman Gupta ee69e93b46
Bump zwave-js-server-python to 0.21.0 (#47408)
Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
2021-03-04 16:15:50 -08:00
Martin Hjelmare 682943511a
Make zwave_js add-on manager more flexible (#47356) 2021-03-04 14:14:24 -08:00
Martin Hjelmare 5ced7395f3
Fix access of missing zwave_js climate unit value (#47380) 2021-03-04 13:11:38 -08:00
Martin Hjelmare d64fe6ea32
Fix zwave_js manual reconfiguration of add-on managed entry (#47364) 2021-03-04 13:11:07 -08:00
Franck Nijhof 7a8b7224c8
Don't raise on known non-matching states in numeric state condition (#47378) 2021-03-04 13:09:08 -08:00
Eric Severance f05f60c4c4
Revert "Speed-up wemo discovery (#46821)" (#47392)
This reverts commit 6e52b26c06.
2021-03-04 13:07:42 -08:00
Erik Montnemery 17401cbc29
Initial automation tracing (#46755)
* Initial prototype of automation tracing

* Small fixes

* Lint

* Move trace helpers to its own file

* Improve trace for state and numeric_state conditions

* Tweaks + apply suggestions from code review

* Index traces by automation_id, trace while script is running

* Refactor condition tracing

* Improve WS API to get traces for single automation

* Add tests

* Fix imports

* Fix imports

* Address review comments

* Cap logging of loops

* Remove unused ContextVar action_config
2021-03-04 14:16:24 +01:00
Chris 6d478804e7
Add LZW36 device schema to zwave_js discovery (#47314)
* Add LZW26 device schema to discovery

Co-authored-by: @kpine

* Update homeassistant/components/zwave_js/discovery.py

Co-authored-by: kpine <keith.pine@gmail.com>

* Add tests

* Fix test

Co-authored-by: kpine <keith.pine@gmail.com>
2021-03-04 00:32:37 +01:00
Erik Montnemery b147ba1377
Correct gogogate2 battery sensor attributes (#47302) 2021-03-03 10:20:48 +01:00
Martin Hjelmare d3721bcf26
Add zwave_js add-on manager (#47251)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-03-02 14:22:42 -08:00
Raman Gupta 42af775f53
Add raw values to zwave_js value notification event (#47258)
* add value_raw to value notification event that always shows the untranslated state value

* add property key and property to event params
2021-03-02 16:10:30 -05:00
Quentame 198ecb0945
Uniformize platform setup (#47101)
* A platform is not a component

* Fix dynalite

* SUPPORTED_PLATFORMS --> PLATFORMS

* In tests

* In tests 2

* Fix SmartThings

* Fix ZHA test

* Fix Z-Wave

* Revert Z-Wave

* Use PLATFORMS const in ambient_station

* Fix ihc comment
2021-03-02 21:43:59 +01:00
Rene Lehfeld 2272925699
Add force_update to tasmota sensors (#47052)
* Add force update also to non-binary sensors as e.g. POWER Measurement agerage cannot be calculated otherwise. This is the same behavior as set with the obsolete tasmota detection

* add tests in binary_sensor and test_sensor for force_update flag

* satisfy flake8

* next try for force_update test but this time on the entity object which is the correct level

* once again satisfy flake8

* one more try for a test

* fix typo

* satisfy black
2021-03-02 18:57:14 +01:00
Paulus Schoutsen 2ebca88950
Fix Alexa doorbells (#47257) 2021-03-02 15:13:45 +01:00
Quentame 6b9abfc2c6
Add init test to Freebox (#46998)
* Add init test to Freebox

* Review : more readable conftest

* Expect 2 blank lines between defs

* Review : Not I/O in the event loop

* Fix test_setup test

* remove useless const

* Review : mock setup methods

* Add service test

* Add import test
2021-03-02 13:37:33 +01:00
tkdrob ab53b49d3f
Clean up constants (#46948)
* Clean up constants

* clean up humidifier constants

* fix tests

* fix prometheus tests

Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
2021-03-02 12:52:00 +01:00
Ville Skyttä dc880118a4
Lint suppression cleanups (#47248)
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
Erik Montnemery 7e71050669
Add battery sensor for gogogate2 wireless door sensor (#47145)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-03-01 17:34:37 -10:00
Marcel van der Veldt 853d9ac4a9
Update color logic for zwave_js light platform (#47110)
Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
2021-03-01 17:12:49 -08:00
Raman Gupta 3e34bb3e89
Add suggested area for zwave_js devices (#47250) 2021-03-01 15:24:55 -08:00
Erik Montnemery 96cc17b462
Add support for a list of known hosts to Google Cast (#47232) 2021-03-01 15:18:18 -08:00
Erik Montnemery dd9e926689
Pass variables to initial evaluation of template trigger (#47236)
* Pass variables to initial evaluation of template trigger

* Add test

* Clarify test
2021-03-01 23:34:26 +01:00
Raman Gupta 3c290c9a44
Address late hassio review (#47229)
* hassio code cleanup to address comments in #46342

* fix code
2021-03-01 12:10:51 -05:00
Dermot Duffy be8584c0bc
Overhaul command_line tests (#46682) 2021-03-01 17:27:04 +01:00
Matt Zimmerman 947f6ea51e
Parameterize SmartTub tests (#47189)
* Parameterize SmartTub tests

* parameterize light service calls

* remove stray print()

* add comment
2021-03-01 13:53:57 +01:00
J. Nick Koston 2de01ddaeb
Remove griddy integration (#47218) 2021-03-01 10:35:23 +01:00
Tobias Sauerwein 732db3b67c
Revert const replacement in fritzbox_callmonitor (#47211) 2021-03-01 10:31:13 +01:00
Raman Gupta 0592309b65
Add hassio addon_update service and hassio config entry with addon and OS devices and entities (#46342)
* add addon_update service, use config flow to set up config entry, create disabled sensors

* move most of entity logic to common entity class, improve device info, get rid of config_flow user step

* fix setup logic

* additional refactor

* fix refactored logic

* fix config flow tests

* add test for addon_update service and get_addons_info

* add entry setup and unload test and fix update coordinator

* handle if entry setup calls unload

* return nothing for coordinator if entry is being reloaded because coordinator will get recreated anyway

* remove entry when HA instance is no longer hassio and add corresponding test

* handle adding and removing device registry entries

* better config entry reload logic

* fix comment

* bugfix

* fix flake error

* switch pass to return

* use repository attribute for model and fallback to url

* use custom 'system' source since hassio source is misleading

* Update homeassistant/components/hassio/entity.py

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

* update remove addons function name

* Update homeassistant/components/hassio/__init__.py

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

* fix import

* pop coordinator after unload

* additional fixes

* always pass in sensor name when creating entity

* prefix one more function with async and fix tests

* use supervisor info for addons since list is already filtered on what's installed

* remove unused service

* update sensor names

* remove added handler function

* use walrus

* add OS device and sensors

* fix

* re-add addon_update service schema

* add more test coverage and exclude entities from tests

* check if instance is using hass OS in order to create OS entities

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-03-01 09:41:04 +01:00
J. Nick Koston 853da40e70
Increment the homekit config version when restarting (#47209)
If an entity changes between restart the iOS/controller
device may have cached the old chars for the accessory.
To force the iOS/controller to reload the chars, we
increment the config version when Home Assistant restarts
2021-02-28 20:42:09 -08:00
Allen Porter 715a254913
Handle stream failures in recorder (#47151)
* Handle stream failures in recorder

Fail gracefully with an error message when the recorder is invoked with no segments due to a stream failure.

* Update homeassistant/components/stream/recorder.py

Co-authored-by: uvjustin <46082645+uvjustin@users.noreply.github.com>

Co-authored-by: uvjustin <46082645+uvjustin@users.noreply.github.com>
2021-02-28 18:01:28 -08:00
Matt Zimmerman 277c3cb661
Cleanup SmartTub filtration cycles (#47192) 2021-02-28 13:53:57 -10:00
Matt Zimmerman bab66a5cb9
Remove turn_on and turn_off from SmartTub pump switches (#47184) 2021-02-28 13:48:30 -10:00
starkillerOG 1c9a9be197
Fix Xiaomi Miio discovery (#47134) 2021-02-28 12:25:40 -08:00
Erik Montnemery 19cd29affa
Fix MQTT trigger where wanted payload may be parsed as an integer (#47162) 2021-02-28 12:19:27 -08:00
Allen Porter 5cc8302e6a
Fix flaky hls keepalive test (#47186)
Remove a call to stream.start() which is issued before the test is fully
setup (e.g. keepalive is not set to True, and mock calls are not registered)
2021-02-28 10:25:07 -08:00
tkdrob fa1d91d1fe
Clean up mqtt_room (#46882) 2021-02-28 14:16:37 +01:00
Maciej Bieniek 66027bcef5
Bump airly library to version 1.1.0 (#47163) 2021-02-28 12:53:13 +01:00
Paulus Schoutsen 7c2545af6e
Use async_capture_events to avoid running in executor (#47111) 2021-02-26 13:28:52 -08:00
Joakim Plate e12eba1989
Add support for v6 features to philips js integration (#46422) 2021-02-26 09:34:40 -08:00
J. Nick Koston 7ab2d91bf0
Add suggested area to hue (#47056) 2021-02-26 10:35:09 -06:00
Charles Garwood d8633f94f6
Guard zwave_js missing nodes in websocket api (#47096) 2021-02-26 16:07:50 +01:00
Raman Gupta 56673f7edf
Remove flaky climacell test (#47080) 2021-02-26 13:45:21 +01:00
Erik Montnemery dfbb653107
Bump pychromecast to 9.0.0 (#47086)
* Adapt to Pychromecast 9.0.0

* Bump pychromecast to 9.0.0

* Fix lint issues
2021-02-26 13:43:53 +01:00