Commit Graph

7612 Commits (7c08592b5af11132c4d75664262041f2946ffecf)

Author SHA1 Message Date
Allen Porter 2136b3013f
Increase test coverage for stream worker (#44161)
Co-authored-by: Justin Wong <46082645+uvjustin@users.noreply.github.com>
2021-02-01 17:48:49 +01:00
Chris a8cf377ed7
Add stop_cover service for zwave_js (#45805) 2021-02-01 16:46:36 +01:00
J. Nick Koston 9f59515bb8
Fix shutdown deadlock with run_callback_threadsafe (#45807) 2021-02-01 10:54:39 +01:00
Raman Gupta 0b63510cab
Add zwave_js binary sensors property name for Notification CC (#45810) 2021-02-01 09:45:24 +01:00
Ville Skyttä 2ffdc4694a
Remove misleading "for" from custom integration warning message (#45811) 2021-02-01 08:36:06 +01:00
J. Nick Koston 385b7e17ef
Move homekit accessory creation to async (#45788) 2021-01-31 11:36:19 -10:00
J. Nick Koston 73d7d80731
Add timeout to lutron_caseta to prevent it blocking startup (#45769) 2021-01-31 21:43:00 +01:00
J. Nick Koston 852af7e372
Update homekit for new async library changes (#45731) 2021-01-31 21:40:24 +01:00
J. Nick Koston dac9626112
Resolve homekit cover adjustment slowness (#45730) 2021-01-31 21:39:35 +01:00
Aidan Timson 2d10c83150
Honeywell Lyric Integration (#39695)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-01-31 07:51:31 -10:00
Vladimír Záhradník ee55223065
SSDP response decode: replace invalid utf-8 characters (#42681)
* SSDP response decode: replace invalid utf-8 characters

* Add test to validate replaced data

Co-authored-by: Joakim Plate <elupus@ecce.se>
2021-01-31 17:59:14 +01:00
J. Nick Koston ea7aa6af59
Update dyson for the new fan entity model (#45762)
* Update dyson for the new fan entity model

* Fix test

* tweak

* fix

* adj

* Update homeassistant/components/dyson/fan.py

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

* move percentage is None block

* move percentage is None block

* no need to list comp

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-31 10:26:02 +01:00
J. Nick Koston 88c4031e57
Fix exception when a unifi config entry is ignored (#45735)
* Fix exception when a unifi config entry is ignored

* Fix existing test
2021-01-30 16:45:46 +01:00
Aaron Bach 6bf59dbeab
Add significant change support to binary_sensor (#45677)
* Add significant change support to binary_sensor
2021-01-30 09:04:35 +01:00
Aaron Bach 85e6bc581f
Add significant change support to lock (#45726) 2021-01-30 09:03:54 +01:00
Nathan Tilley 07a4422a70
Implement person significant change (#45713) 2021-01-30 08:05:58 +01:00
Ryan Fleming 8a112721fa
Fix feedback from UVC (#45630)
* Fixing feedback from UVC

* Couple of fixes
2021-01-30 08:00:27 +01:00
Paulus Schoutsen 87d40ff815
Do not cache frontend files during dev (#45698) 2021-01-30 00:05:06 +01:00
Pascal Reeb f07ffee535
Advanced testing for Nuki config flow (#45721) 2021-01-29 17:01:25 -05:00
Martin Hjelmare ace5b58337
Fix ozw init tests (#45718) 2021-01-29 20:58:57 +01:00
Joakim Plate d4f186078c
During tests we can run with lowest rounds (#45710) 2021-01-29 19:57:14 +01:00
Robert Svensson 97fd05eb9f
Allow new UniFi flows to update existing entries if host and site match (#45668) 2021-01-29 18:14:39 +01:00
Joakim Plate af68d5fb41
Use a fully mocked credential (#45707) 2021-01-29 17:58:25 +01:00
Martin Hjelmare bcc9add0b4
Fix mqtt check in ozw (#45709) 2021-01-29 17:57:39 +01:00
J. Nick Koston 5f9a1d105c
Improve HomeKit Accessory Mode UX (#45402) 2021-01-29 09:57:13 -06:00
Pieter Mulder c1586f97db
Only show matching caldav events in calendar (#45701) 2021-01-29 15:25:01 +01:00
Steven Looman 71c169c84f
Address late review comments for upnp (#45696) 2021-01-29 12:27:57 +01:00
Pascal Reeb ba55f1ff4b
Add config flow for nuki (#45664)
* implemented config_flow for nuki component

* warn -> warning

* exception handling & config_flow tests

* gen_requirements_all

* Update config_flow.py

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2021-01-29 11:05:13 +01:00
Steven Looman 25c5c6aec9
Refactoring upnp component (#43646) 2021-01-29 10:23:34 +01:00
Dermot Duffy c66a892233
Remove YAML support from Hyperion integration (#45690) 2021-01-29 09:05:00 +01:00
Guido Schmitz 8b3156ea82
Use new fixtures in devolo Home Control tests (#45669) 2021-01-29 03:14:39 +01:00
Julian Löhr 7bc8060122
Add reauthentication flow to fritzbox integration (#45587) 2021-01-29 00:08:59 +01:00
jjlawren d7e0391e03
Allow Plex playback using provided playqueue ID (#45580) 2021-01-28 17:21:31 +01:00
Guido Schmitz 8065ece0bd
Add first set of tests to devolo Home Control integration (#42527)
* Add first two testcases

* Remove repetition

* Add first two testcases

* Remove repetition

* Add connection error test case

* add test_setup_entry_credentials_valid

* First attempt to use fixtures

* Use markers

* Optimize patch

* Optimize marker use

* Always patch mydevolo

* Add first two testcases

* Remove repetition

* Add first two testcases

* Remove repetition

* Add connection error test case

* add test_setup_entry_credentials_valid

* First attempt to use fixtures

* Use markers

* Optimize patch

* Optimize marker use

* Always patch mydevolo

* Add unload entry test case

* Catch up with reality

* Use unittest patch

* Use core interface to start tests

* Use entry state

* Consistently assert entry state

* Patch class instead of init

Co-authored-by: Markus Bong <2Fake1987@gmail.com>
2021-01-28 17:14:33 +01:00
J. Nick Koston 3ff75eee53
Update homekit to use new fan entity model (#45549) 2021-01-28 12:38:18 +01:00
Joakim Plate 38d2cacf7a
Support blocking trusted network from new ip (#44630)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-01-28 12:06:20 +01:00
J. Nick Koston ab1d42950a
Update homekit_controller to use new fan entity model (#45547) 2021-01-28 11:43:43 +01:00
J. Nick Koston babfef829d
Add support for percentage speeds and preset modes to template fan (#45478) 2021-01-28 10:44:36 +01:00
J. Nick Koston 22e44e4ba4
Update zwave to use new fan entity model (#45541)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-01-28 10:35:01 +01:00
J. Nick Koston 85e463d507
Update bond to use new fan entity model (#45534) 2021-01-28 10:23:12 +01:00
J. Nick Koston 0693d8a064
Update zwave_js to use new fan entity model (#45543) 2021-01-28 10:15:24 +01:00
J. Nick Koston e43d865112
Update ozw to use new fan entity model (#45577) 2021-01-28 09:40:10 +01:00
Paulus Schoutsen 92e084cee1
Include relative path in tts get url (#45623)
* Include relative path in tts get url

* Always cal get_url when requested
2021-01-28 09:33:18 +01:00
Marc Mueller 7673f57248
Add additional error handling for automation script run (#45613) 2021-01-28 09:26:41 +01:00
Erik Montnemery 5711d61b38
Bump hatasmota to 0.2.7 (#45625) 2021-01-28 08:55:22 +01:00
J. Nick Koston 068d1b5eb8
Separate fan speeds into percentages and presets modes (#45407)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: John Carr <john.carr@unrouted.co.uk>
2021-01-27 17:44:36 -06:00
Julian Engelhardt 3f948e027a
Clean tcp tests (#41673)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-27 22:37:59 +01:00
J. Nick Koston a1662b3bb9
Restore the device id after deleting and re-adding an integration (#45348) 2021-01-27 17:10:57 +01:00
springstan 566058f701
Add config flow to fritzbox_callmonitor (#40736) 2021-01-27 16:53:45 +01:00
Dennis Schroer 8d572af77a
Add Huisbaasje integration (#42716)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-01-27 15:53:25 +01:00
Marc Mueller fb39185420
Add schema error handling to websocket_api (#45602)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-27 15:20:22 +01:00
linebp 211ef60d96
Convert media_player unittest tests to pytest style (#41950)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-27 14:50:01 +01:00
Robert Chmielowiec 80c2efa9f2
Add total energy, preheater and RMOT sensors to comfoconnect (#45373) 2021-01-27 08:10:58 -05:00
Shulyaka eea50c8ccc
Add device actions for Number (#44240) 2021-01-27 13:40:13 +01:00
Maciej Bieniek 5d955eb039
Change update interval tests in AccuWeather integration (#45562) 2021-01-27 13:28:29 +01:00
Marcel van der Veldt 32c6509d55
Remove unwanted brightness check in zwave_js light (#45597) 2021-01-27 13:07:02 +01:00
Thomas Hollstegge 78b057ce02
Make sure generated slugs are not empty (#43153) 2021-01-27 12:25:49 +01:00
CtrlZvi 1433cdaa12
Prefer shorter keys for intent matching (#43672)
When using fuzzy matching to match entity names for intents, whichever
entity is first is preferred in the case of equal matches. This leads
to situations where entities with similar names (such as entities named
for their area and then specific area location) may be used when the
whole area is wanted.

I ran into this with the my Phillips Hue lights. I have each individual
light named such that its room is the first part of the name, and its
location within the room after. So my living room has:
Living Room West
Living Room Northwest
Living Room North
Living Room Northeast

I then have a group for the whole room:
Living Room

Because the group is the last of the entities, trying to adjust the
whole room only activates one light, because all of the lights match
equally well.

By preferring the shortest of equal matches, we prefer keys that have
the least amount of extra information, causing "Living Room" to match
the group instead of an individual light.
2021-01-27 12:16:19 +01:00
Lars Marowsky-Brée 34194da1b6
New methods for input_select component (#42968)
This adds a `cycle` attribute to select_previous/next, and
select_first and select_last services.

This is quite useful for streamlining using input_select via
automations, such as when they represent a list of states to step
through; if the first option is the dimmest and the last the brightest,
one may not want to accidentally cycle from the first to the last, for
example.

Similarly, being able to directly select the first or last removes
adjustment in related automations.
2021-01-27 11:17:59 +01:00
Ryan Fleming 459236fcdd
Camera Status and Motion record status (#44936) 2021-01-27 10:50:44 +01:00
Adrian Suwała e12e2377af
Rewrite hddtemp unittest tests to pytest (#42513) 2021-01-27 10:24:04 +01:00
Dermot Duffy 890eaf840c
Add advanced Hyperion entities (#45410)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-01-27 09:35:13 +01:00
Thomas Lovén 06ade6129c
Add selectors for text and arbitrary objects (#45112)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-01-27 09:20:19 +01:00
Martin Hjelmare f387e833c3
Add zwave_js add-on config flow support (#45552) 2021-01-27 08:56:16 +01:00
Marc Mueller c805baf88c
Refactor slack tests (#45561)
* Refactor slack tests

* Changes

* Let service register for tests
2021-01-27 04:32:14 +01:00
J. Nick Koston 25f411ef6e
Add support for Pico and Shade remotes to Lutron Caseta (#45315) 2021-01-26 16:32:08 -06:00
Chris Talkington 14785660b0
Avoid proxied Roku images during internal requests (#43547) 2021-01-26 23:21:25 +01:00
Yuval Aboulafia 73d2ae76a9
Round Mold Indicator attributes (#43622) 2021-01-26 23:14:53 +01:00
Sami Heino ee8d88e85c
Add support for EDS0068 onewire sensor (#44029)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2021-01-26 23:07:04 +01:00
Paulus Schoutsen 352d0870e3
Light significant changes + sensor tweaks (#45583) 2021-01-26 22:11:06 +01:00
Dror Eiger 74efe78d0a
Add device metadata for Google Assistant (#45507)
* Add device metadata for Google Assistant

* Increase test coverage

* Refactor fetching the device and entity entries.
2021-01-26 21:59:43 +01:00
Paulus Schoutsen 712a5a098d
Add significant change filtering to Google (#45566) 2021-01-26 21:45:09 +01:00
Dermot Duffy 568962552b
Remove hyperion entry from registry only when instances are fully removed (#44488) 2021-01-26 21:39:02 +01:00
Jc2k 3b0a440770
Add support for homekit_controller secondary entities like power usage (#44013) 2021-01-26 13:45:01 -06:00
Robert Svensson 26764a805b
Don't parse previous messages when UniFi connection state change to available (#45544)
* Don't parse previous messages when connection state change to available

* Disable pylint for arguments-differ W0221 message
2021-01-26 16:41:28 +01:00
radovanbauer baab9b9a81
Added command templates for the mqtt climate component. (#44976)
This allows integrating with devices which require more complex payloads to be posted when updating their values.

Old feature request: https://github.com/home-assistant/core/issues/11496
There are numerous posts requesting this feature, example: https://community.home-assistant.io/t/need-help-with-value-template-for-mqtt-hvac/73395/68https://community.home-assistant.io/t/need-help-with-value-template-for-mqtt-hvac/73395/68

Command templates have been added for the following:
- fan_mode
- hold
- mode
- swing_mode
- temperature
- temperature high/low

This doesn't add templates for aux, away mode, power since these already accept custom payload_on/off (although they all share the same payload). It should be straightforward to add templates for them as well if needed.
2021-01-26 16:12:33 +01:00
Joakim Sørensen b1c2cde40b
Changes to filename and path validation (#45529)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-01-26 15:53:21 +01:00
Paulus Schoutsen 4739e8a207
Limit data sending to Alexa to significant changes (#45563) 2021-01-26 15:48:35 +01:00
Paulus Schoutsen d082be787f
Add "significant change" base (#45555) 2021-01-26 14:13:27 +01:00
starkillerOG c16fd0a1ac
Set hyperion icon to lightbulb when off (#45351)
Co-authored-by: Dermot Duffy <dermot.duffy@gmail.com>
2021-01-26 10:46:54 +01:00
starkillerOG 3647d549b0
Fix Hyperion brightness setting (#45335) 2021-01-26 10:45:41 +01:00
Paulus Schoutsen b9a525a9a7
Add an HTTP view to dump the Z-Wave JS state (#45452)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2021-01-26 10:27:20 +01:00
William Scanlon 260d9f8e16
Upgrade econet to use new API (#44427)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-26 09:18:20 +01:00
north3221 f2a8ccdbae
Add tado service set temperature offset (#45014) 2021-01-26 09:11:29 +01:00
Robert Svensson 622906965d
Add better message to deCONZ event logbook when information is available (#45545)
* Add better message when information is available

* Fix pylint
2021-01-26 08:15:39 +01:00
Marc Mueller ad677b9d41
Improve Slack notify component (#45479)
* Add typing information

* Small improvments

* Use %r for exceptions
* Added exception handlers for aiohttp.ClientError
* Added testcase

* Changes after review

* Bugfixes
2021-01-25 17:03:12 -07:00
Marcel van der Veldt 11009b99bd
Improve zwave_js light targetvalue vs currentValue selection (#45477) 2021-01-25 22:09:12 +01:00
Ian Tewksbury 666a94a8e1
Add zwave_js ZWavePropertyBinarySensory (#45504) 2021-01-25 15:50:21 +01:00
Leonardo Figueiro d174c8265e
Add WiLight Fan (#39541)
* Add WiLight Fan

Add fan to WiLigt integration

* Updated fan.py and test_fan.py

* Creating new fan test

* Update homeassistant/components/wilight/__init__.py

OK!
Done!

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

* Update homeassistant/components/wilight/fan.py

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

* Update homeassistant/components/wilight/fan.py

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

* Update homeassistant/components/wilight/fan.py

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

* As MartinHjelmare requested

* Update fan.py

* Update tests/components/wilight/test_fan.py

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

* Update tests/components/wilight/test_fan.py

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

* Update test_fan.py

As Martin Hjelmare suggested

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-25 14:03:11 +01:00
SukramJ 104107dd95
Bump dependency for HomematicIP Cloud to 0.13.1 (#45475) 2021-01-25 13:19:11 +01:00
Paulus Schoutsen bf8d17f1b5
Better wait for Z-Wave to be initialized (#45520) 2021-01-25 13:12:58 +01:00
Xiaonan Shen dbaca51bb3
Rewrite dyson climate tests (#45493)
* Rewrite dyson climate tests

* Cleanup
2021-01-24 17:37:48 +01:00
Robert Svensson b69d9860b6
Improve Axis tests following late review in SSDP PR (#45489) 2021-01-24 14:14:49 +01:00
J. Nick Koston 47c0adb312
Remove YAML support from tado (#45384) 2021-01-24 01:33:30 +01:00
Raman Gupta c2900ff888
Add support for zwave_js lock services (#45451) 2021-01-23 18:21:31 -05:00
Robert Svensson 1e7e5220a3
Add SSDP discovery support to Axis integration (#45474)
* Add SSDP discovery support to Axis integration

* Remove unnecessary f-string

* Remove the last of the f-string...
2021-01-23 23:51:49 +01:00
Xiaonan Shen 59b0a4d060
Rewrite dyson air quality tests (#45466) 2021-01-23 14:54:58 -05:00
Paulus Schoutsen eb339b9793
Fix flaky SRP_Energy test (#45471) 2021-01-23 19:53:45 +01:00
Paulus Schoutsen 0930aae208
Avoid misuse sanitize_path, clarify docs (#45469) 2021-01-23 18:28:57 +01:00
Erik Montnemery f86beed7b0
Subscribe only to valid MQTT discovery topics (#45456) 2021-01-23 08:51:25 -05:00
J. Nick Koston a0b906005d
Remove YAML support from nuheat (#45380) 2021-01-23 06:27:32 +01:00
J. Nick Koston 954ad854fb
Remove the ability for mqtt to set speeds that are not in the speed_list (#45445) 2021-01-23 06:24:06 +01:00
Dermot Duffy e40f0bf429
Disconnect Hyperion client in error conditions (#45411) 2021-01-23 06:21:38 +01:00
Alexei Chetroi daf24dc508
Always apply default light profiles, unless a profile is given (#45450) 2021-01-23 06:20:53 +01:00
J. Nick Koston 431b143eec
Add a one touch pairing config flow for lutron caseta (#45136)
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2021-01-22 17:48:06 -06:00
Robert Svensson 03fb73c0ae
Option to select what video source Axis camera should use (#45268)
* Fully working proposal of config option to select what video source camera entity should use

* Bump dependency to v43
Reflect dependency changes in how image sources is now a dict

* Fix bdracos comment
2021-01-23 00:15:58 +01:00
Chris 68e7ecb74b
Add zwave-js fan platform (#45439)
* Add zwave-js fan platform

* Update remaining tests

* Missing awaits, tests fixed

* Fix typing

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-23 00:11:32 +01:00
Robert Svensson 22a6e55e70
Base deCONZ group supported features on the sum of all its lights (#45440) 2021-01-22 23:39:34 +01:00
Robert Svensson 57fa7f926a
Introduce reauth flow to deCONZ (#45443) 2021-01-22 23:37:16 +01:00
Robert Svensson 18c7ae9a8b
Fix hs_color crashing when activating scenes in deCONZ on color_temp lights (#45159) 2021-01-22 22:40:22 +01:00
Robert Svensson aaf4cd4a25
Basic logbook support for deCONZ events (#45400)
* Basic logbook support

* Improve formulation of message

* Improve typing
2021-01-22 22:39:11 +01:00
Simone Chemelli 86cd7911de
Clarify ConfigEntryNotReady log (#45425)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Charles Garwood <cgarwood@gmail.com>
2021-01-22 12:13:23 -05:00
Chris 198b875a6f
Add cover platform to zwave js (#45193) 2021-01-22 11:51:39 -05:00
Xiaonan Shen 7e8d0a263c
Rewrite dyson init test (#45409) 2021-01-22 10:27:43 -05:00
J. Nick Koston 38d4af1a6e
Remove YAML support from powerwall (#45381) 2021-01-21 21:59:33 -05:00
Shay Levy f117ddc6fa
Stop update_coordinator schedule refresh when HA is stopping (#45338)
* Stop update_coordinator schedule refresh when HA is stopping

* Add unittests

* Fix event type
2021-01-22 00:23:50 +01:00
J. Nick Koston d733292982
Remove YAML support from hunterdouglas_powerview (#45376) 2021-01-21 13:51:08 -05:00
J. Nick Koston db83aea1df
Remove YAML support from nexia (#45379) 2021-01-21 13:45:52 -05:00
Xiaonan Shen 5de8639798
Rewrite dyson sensor test (#45382) 2021-01-21 13:43:52 -05:00
J. Nick Koston b68c287ff1
Add SSDP discovery to unifi (#45364) 2021-01-21 11:03:54 -06:00
Robert Svensson b601e7e497
Introduce reauthentication flow to Axis integration (#45307) 2021-01-21 12:56:04 +01:00
jjlawren 1f66457a34
Separate Plex/Sonos cross-integration tests (#45370) 2021-01-21 11:22:19 +01:00
J. Nick Koston bb1224d06f
Remove YAML support from myq (#45375) 2021-01-21 09:27:04 +01:00
J. Nick Koston e8cda598ac
Fix memory leak in dhcp integration (#45378)
* Fix memory leak in dhcp integration

Passing the L2socket to AsyncSniffer caused a memory
leak on some systems. To ensure we can create a socket,
we do a test creation before starting AsyncSniffer
since the sniffer will create it in another thread
and we cannot see any permission error otherwise.

* Update tests

* space

* do not store packets
2021-01-21 08:26:58 +01:00
Mick Vleeshouwer 9b14586568
Add DemoCover with only tilt controls (#45228)
* Add DemoCover with only tilt controls

* Add default tilt position to Pergola Roof

* Apply githooks (isort)

* Add new demo device to Google Assistant fixtures
2021-01-20 19:11:55 -06:00
J. Nick Koston 536e835b39
Switch frequently used unifi controller properties to attributes (#45365) 2021-01-20 16:58:02 -06:00
J. Nick Koston 243014bff1
Fix test_wait_template_with_utcnow (#45356) 2021-01-20 23:56:00 +01:00
Xiaonan Shen 96448c6778
Change Dyson PureCoolLink fan speeds to adhere the standard (#45331) 2021-01-20 16:27:16 -05:00
J. Nick Koston a7741be9bb
Wait for all triggers when one fails to attach (#45361) 2021-01-20 22:13:21 +01:00
Robert Svensson da4404e8cf
Introduce reauthentication flow to UniFi integration (#45360)
* Improve site selection

* Reauth flow and tests
Add **kwargs to mock_aiohttp_client create_session to support inputting verify_ssl and cookie_jar

* Update homeassistant/components/unifi/config_flow.py

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

* Minor improvements

* Improve coverage

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-01-20 22:10:40 +01:00
Maciej Bieniek 14f5eb7305
Increase update interval in AccuWeather integration (#44984) 2021-01-20 15:17:53 -05:00
Xiaonan Shen 7a01d33814
Add empty password support to pi-hole (#37958) 2021-01-20 16:40:23 +01:00
Allen Porter bf0e012d1e
Repair stream test_recorder.py and mark not flaky (#45054)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-01-20 14:44:24 +01:00
J. Nick Koston 3ae527c158
Switch dhcp to use async sniff for faster shutdown (#45339)
* Switch dhcp to use async sniff for faster shutdown

* Do not actually start the thread since we do not know when it will finish starting
2021-01-19 20:49:49 +01:00
Martin Hjelmare a9a0f8938f
Move device tracker scanner attributes to ScannerEntity (#45312) 2021-01-19 11:04:08 -06:00
Charles Garwood c1addde6f9
Add node_status websocket API command to zwave_js (#45325) 2021-01-19 16:41:24 +01:00
Xiaonan Shen c929fbeea3
Rewrite dyson fan test (#45295)
* Improve device fixture to take parameter

* Remove unused code in dyson/fan

* Rewrite dyson fan test
2021-01-19 10:12:38 +01:00
Erik Montnemery 852136ccfe
Bump hatasmota to 0.2.5 (#45297) 2021-01-18 22:26:33 +01:00
Alan Tse 4928476abe
Allow notify services to update existing targets (#45283) 2021-01-18 21:42:20 +01:00
Charles Garwood 8de0b7b948
Add add & remove node commands to zwave_js websocket api (#45232) 2021-01-18 10:08:52 -05:00
Greg Dowling adab9adbce
Pyroon discovery (#44811)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-01-18 10:00:30 -05:00
Xiaonan Shen 5ee4479151
Rewrite dyson vacuum test (#45265) 2021-01-18 09:56:54 -05:00
J. Nick Koston c621c0fa5d
Remove YAML support from nut (#45276) 2021-01-18 15:16:42 +01:00
Robert Svensson 8e0addd216
Fix error with Axis light events without representation in light control (#45277) 2021-01-18 15:00:27 +01:00
gregod cf9ea6f82d
Sanitize user-agent in wrong_login message (#45251) 2021-01-18 09:21:30 +01:00
Raman Gupta b2f914823d
Add climate platform to zwave_js (#45177)
* add zwave_js support for climate

* fix

* add fixture

* rename fixture

* fix variable name error

* add tests

* fix tests and handle set_temp properly based on unit

* update call being tested

* fix tests

* improve coverage

* fix docstring

* address review comments

* fix test

* update enum class name

* bump zwave-js-server-python version and assume primary_value is always set

* add additional coverage

* fix docstrings and move populating modes/presets into initialization

* attempt to address comments

* improve comment

* move mode value into a variable so its easier to iterate in the future

* dont assume mode as a discovery point

* assume all values are available when node is ready

* fix order of operations

* switch to valueerror

* use primary value

* readd property and type to discovery schema
2021-01-18 03:45:06 +01:00
J. Nick Koston ae3d038baa
Update gogogate2 to be async (#42066) 2021-01-17 11:38:30 -06:00
Xiaonan Shen dcd17530cd
Add device classes to Dyson sensors (#45264) 2021-01-17 14:41:32 +01:00
J. Nick Koston fbc98b1291
Make DHCP discovery ignore self assigned ip addresses (#45256) 2021-01-17 10:35:02 +01:00
Xiaonan Shen a42d43d054
Improve dyson code (#45172)
* Improve air_quality

* Improve climate

* Improve sensor

* Improve vacuum

* Improve fan

* Fix pylint

* Improve on_message

* Change unique ID back

* Remove unused attribute

* Remove redundant current_humidity

* Merge current_temperature

* Rename fan device to fan entity

* Fix filter life sensors

* Remove unneeded context switch

* Remove entity_type

* Fix pylint

* Add comment on humidity check
2021-01-17 10:24:26 +01:00
J. Nick Koston 28a611f3da
Use standard device tracker attributes for "ip" and "mac" in Mikrotik (#45255)
* Mikrotik now uses the device_tracker standard attributes for "ip" and "mac"

The "mac_address" and "ip_address" attributes have been removed.

* Update homeassistant/components/mikrotik/device_tracker.py
2021-01-17 10:18:07 +01:00
J. Nick Koston 41e7d960ee
Use dispatcher for unifi heartbeat tracking (#45211)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-17 03:10:52 +01:00
J. Nick Koston b71a9b5e28
Prefill the ip address for powerwall discovery (#45209) 2021-01-17 03:09:04 +01:00
J. Nick Koston 11cbf1152d
Add dhcp discovery properties to mikrotik (#45205) 2021-01-17 00:26:32 +01:00
Robert Svensson 3cc45697cb
Prettier Zeroconf discovery name for Axis devices (#45216)
* Change zeroconf name to be based of prettier name rather than hostname to help user understand what device is discovered
Have a full zeroconf discovery message in tests
Clean up unusued globals

* Use non-formatted serial number for config entry title as well
2021-01-16 18:59:57 +01:00
Shay Levy 8151721fbc
Move switcher_kis services to entity services (#45204) 2021-01-16 18:18:40 +01:00
Raman Gupta 562d30319b
Add lock platform to zwave_js (#45175)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-16 11:43:25 -05:00
Robert Svensson 2044b33eb6
Add DHCP discovery support to Axis integration (#45167) 2021-01-16 11:03:56 +01:00
J. Nick Koston 233f923cd7
Add support for discovering individual roombas (#45200)
* Add support for discovering individual roombas

* add missing translation string

* Update homeassistant/components/roomba/strings.json

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-15 21:28:12 -10:00
J. Nick Koston 5e01b828af
Discover devices from device_trackers with router sources (#45160)
* Discover devices from device_trackers with router sources

* Update homeassistant/components/dhcp/__init__.py

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

* fix stop being called on the wrong context

* clean

* move it to base

* cleanup was too agressive

* Update homeassistant/components/dhcp/__init__.py

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

* coverage

* revert legacy changes

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-16 01:01:37 +01:00
Robert Svensson 598a0d19b1
Normalise unique ID in Axis integration (#45203)
* Move adding unique id to config entry from setup_entry to migrate_entry

* Normalise unique ID

* MQTT subscribe should still use the serial number in the way the device itself expects
2021-01-16 01:01:14 +01:00
J. Nick Koston b3764da912
Fix exception when trying to configure an ignored somfy mylink (#45198) 2021-01-16 00:48:19 +01:00
J. Nick Koston cffb1458a1
Improve dhcp discovery for somfy_mylink to handle multiple devices (#45166)
* Improve dhcp discovery for somfy_mylink to handle multiple devices

* Fix ip

* normalize

* logging debug

* force str

* we need a str

* fix tests

* add tests

* pylint
2021-01-15 19:47:25 +01:00
Charles Garwood 9dbf14188a
Add WebSocket API Foundation for zwave_js (#45151) 2021-01-15 15:17:40 +01:00
Marcel van der Veldt 071c8cc67d
Add binary_sensor platform to zwave_js (#45081)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-15 09:15:03 -05:00
Pascal Vizeli e1427c45f2
Bump aioHTTP 3.7.3 - YARL 1.6.3 (#45180) 2021-01-15 13:19:22 +01:00
Paulus Schoutsen 93c2f2bbeb
Bump Z-Wave JS Server Python to 0.9.0 (#45181) 2021-01-15 10:59:35 +01:00
Franck Nijhof dee0f887de
Extend filter and filter tests (#45179) 2021-01-15 10:30:29 +01:00
Marcel van der Veldt a276f2d19e
Fix zwave_js adding not fully interviewed nodes (#45162)
* fix situation were nodes are being added or not fully interviewed

* adjust test

* lint
2021-01-15 01:09:03 +01:00
J. Nick Koston 7fada806af
Downgrade dhcp log message error message when running without CAP_NET_RAW (#45157) 2021-01-14 10:46:15 -10:00
Franck Nijhof f047d04882
Add filtering 2021-01-14 20:02:01 +01:00
J. Nick Koston 4efe6762c4
Remove YAML support from harmony (#45140) 2021-01-14 09:45:32 +01:00
J. Nick Koston da677f7d5a
Add support for discovery via DHCP (#45087)
* Add support for discovery via DHCP

* additional tesla ouis

* merge tests

* dhcp test

* merge requirements test

* dhcp test

* dhcp discovery

* dhcp discovery

* pylint

* pylint

* pylint

* fix

* Add matching tests

* 100% cover

* cleanup

* fix codespell

* Update exception handling

* remove unneeded comment

* fix options handling exception

* fix options handling exception
2021-01-14 09:09:08 +01:00
Petro31 3ebc5d45a8
Add energy and power sensor tests & fix device_class (#45122) 2021-01-13 15:37:54 -05:00
Paulus Schoutsen 732cf47ff6
Filter some Alexa reports that are duplicate (#45093)
* Filter some Alexa reports that are duplicate

* When state changes during reporting, only report last state, not all state changes
2021-01-13 16:54:54 +01:00
Diogo Gomes 81c77942eb
Update the Utility Meter sensor status on HA start (#44765)
* fix status on HA start

* better coverage and fix

* fix test

* address review
2021-01-13 16:42:28 +01:00
Martin Hjelmare 79d37fdf12
Add zwave_js light platform tests (#45107)
* Add bulb 6 multi color device state fixture

* Add light test foundation

* Add no cover comment for todo code

* Update hs_color

* Test turn on light

* Test light turn off

* Fix brightness comparison

* Test setting same brightness

* Test setting same rgb color

* Test color temp update

* Test setting same color temp

* Add entity module to coverage calculation

* Fix typing
2021-01-13 16:28:51 +01:00
Alexei Chetroi de8f273bd0
Allow input_number entity_id as for numeric_state trigger thresholds (#45091)
* Allow input_number as limits for numeric_state trigger

* Rename threshold schema
2021-01-13 16:20:59 +01:00
Sergio Conde Gómez 83b210061d
Add config_flow and stream selection to foscam (#41429)
* Add config_flow and stream selection to foscam

* Simplify config_flow steps

* Make debug log entry more useful

* Deprecate config and platform schemas

* Simplify config loading

* Add config flow testing

* Remove unneeded CONFIG_SCHEMA deprecation

* Improve test coverage

* Unload service by tracking loaded entries

* Address comment

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-01-13 16:09:05 +01:00
jjlawren 411cc6542c
Move Plex->Sonos playback to built-in service (#45066)
* Move Plex->Sonos playback service from integration to platform

* Test against 'native' Plex media_players

* Add Plex to Sonos after_dependencies

* Remove circular dependency

* Raise exceptions in failed service calls

* Add test to forward service call from Sonos

* Additional Sonos->Plex tests

* Fix docstring
2021-01-13 15:24:44 +01:00
Jacob Southard 3364e945aa
Fix HomeKit climate integration for devices with a single set point in Heat_Cool mode. (#45065)
* Check supported flags in auto mode, and add tests.

* Fix test description.
2021-01-13 15:21:32 +01:00
Robert Svensson 6325bc8bfe
Follow Axis library changes and improve tests (#44126) 2021-01-13 14:03:54 +01:00
Alexei Chetroi ec038bc6ea
Allow any parameter of a light profile as an optional parameter (#44079)
* No code duplication for profile application

* Refactor color profile as a dataclass

* Typing

* Make color_x and color_y of a Light profile optional

* Update tests

* Make brightness field of a Light profile optional

* Transition can be of a float type

* Allow fractional transition times in light profiles

Make transition of a float type.
Allow transition to be optional with 5 column CSV files.

* Make pylint happy

* Fix dropped async_mock

* Simplify CSV row schema
2021-01-13 12:11:20 +01:00
J. Nick Koston ac60b34d17
Roomba cleanups (#45097)
* Roomba cleanups

Remove async_step_init backwards compat

Move urls to description_placeholders.

Fix typos

* fix test

* fix fallback to manual when roomba is in the wrong state
2021-01-13 07:27:25 +01:00
Allen Porter eebd0d333e
Clear cached nest event images after expiration (#44956)
* Clear cached nest event images after expiration

* Don't share removal cleanup with alarm cleanup

Don't share code across these functions since it would require a dummy timestamp values that is unnecessary.

* Increase test coverage on sdm camera remove

* Update homeassistant/components/nest/camera_sdm.py

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

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-01-12 22:08:59 -08:00
Paulus Schoutsen 82746616fa
Cloud: Add web socket API to pick default TTS language (#45064)
* Allow picking default TTS language

* Fix test

* Fix coroutine function

* Improve test coverage

* Remove stale import

* Clean up hass

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-13 00:05:30 +01:00
Charles Garwood be2aba6c52
Fix docstring in zwave_js switch test (#45076) 2021-01-12 14:29:12 +01:00
Paulus Schoutsen e83ced6737
Add name to ignored entries (#45051)
* Add name to ignored entries

* Fix test
2021-01-12 09:26:20 +01:00
Charles Garwood f312b87a3f
Add switch platform to zwave_js (#45046) 2021-01-11 18:40:39 -05:00
Philip Allgaier cad2fa89ed
Default `input_datetime` to current date (#45052) 2021-01-11 23:45:58 +01:00
Philip Allgaier bade98624d
Fix tests for input_datetime (#45055) 2021-01-11 23:13:16 +01:00
J. Nick Koston 13cdf0ba63
Cleanups for somfy_mylink (#45026)
* Cleanups for somfy_mylink

* Use the target/unique_id to configure reverse

* Simplify options flow

* Various code review cleanups

* Deprecate YAML

* revert get change

* revert get change

* add note about empty response

* move CONF_DEFAULT_REVERSE out of loop

* Update homeassistant/components/somfy_mylink/config_flow.py

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

* Ensure we deepcopy options

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-11 10:10:02 -10:00
Shay Levy e3f38942cc
Add 100% tests coverage for Shelly cover and switch platforms (#45001) 2021-01-11 16:45:06 +01:00
Martin Hjelmare d270f9515b
Add zwave_js init module tests (#45048)
* Add entry setup and unload test

* Test home assistant stop

* Test on connect and on disconnect

* Test client connect timeout

* Test ready node added

* Test non ready node added

* Test existing node not ready

* Test device registry state

* Add common test tools module

* Add existing ready node test

* Include init module in coverage calculation

* Clean docstrings
2021-01-11 16:05:11 +01:00
Erik Montnemery d60fc0de38
Add availability_mode "all" and "any" to MQTT entities (#44987)
* Add availability_mode "all" to MQTT entities

* Add availability mode any
2021-01-11 16:04:22 +01:00
J. Nick Koston 74e7f7c879
Update roomba config flow to walk users through pairing (#45037)
* Update roomba config flow to walk users though pairing

* Remove YAML support

* adjust tests

* increase cover

* pylint

* pylint
2021-01-11 14:46:54 +01:00
J. Nick Koston 38a5f25b59
Fix vacuums that do not support start with homekit (#45030)
* Fix vacuums that do not support start with homekit

* fix tests
2021-01-11 14:38:42 +01:00
Allen Porter 65e3661f88
Repair flaky and broken stream tests in test_hls.py, and turn back on (#45025)
* Unmark tests as flaky (though still flaky)

This put tests into the broken state where they are flaky and do not yet pass

* Fix bug in test_hls_stream with incorrect path

* Enable and de-flake HLS stream tests

Background: Tests encode a fake video them start a stream to be decoded. Test
assert on the decoded segments, however there is a race with the stream worker
which can finish decoding first, and end the stream which ereases all buffers.

Breadown of fixes:
- Fix the race conditions by adding synchronization points right before the
  stream is finalized.
- Refactor StreamOutput.put so that a patch() can block the worker
  thread.  Previously, the put call would happen in the event loop which was
  not safe to block. This is a bit of a hack, but it is the simplist possible
  code change to add this synchronization and arguably provides slightly better
  separation of responsibilities from the worker anyway.
- Fix bugs in the tests that make them not pass, likely due to changes
  introduced while the tests were disabled
- Fix case where the HLS stream view recv() call returns None, indicating
  the worker finished while the request was waiting.

The tests were previously failing anywhere from 2-5% of the time on a lightly
loaded machine doing 1k iterations.  Now, have 0% flake rate.  Tested with:
$ py.test --count=1000 tests/components/strema/test_hls.py
2021-01-11 14:34:45 +01:00
J. Nick Koston af21893652
Remove safe mode from HomeKit (#45028)
Safe mode was added to work around a race condition where
the mdns announcment was sent too early and would cause
pairing to fail. Since this has been corrected in
HAP-python, there is no longer a need to have
safe mode.
2021-01-11 14:26:09 +01:00
Charles Garwood d68fdbc283
Add zwave_js integration (#45020)
* Run zwave_js scaffold (#44891)

* Add zwave_js basic connection to zwave server (#44904)

* add the basic connection to zwave server

* fix name

* Fix requirements

* Fix things

* Version bump dep to 0.1.2

* fix pylint

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

* Bump zwave-js-server-python to 0.2.0

* Use zwave js server version check instead of fetching full state (#44943)

* Use version check instead of fetching full state

* Fix tests

* Use 0.3.0

* Also catch aiohttp client errors

* Update docstring

* Lint

* Unignore zwave_js

* Add zwave_js entity discovery basics and sensor platform (#44927)

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

* Complete zwave_js typing (#44960)

* Type discovery

* Type init

* Type entity

* Type config flow

* Type sensor

* Require typing of zwave_js

* Complete zwave_js config flow test coverage (#44955)

* Correct zwave_js sensor device class (#44968)

* Fix zwave_js KeyError on entry setup timeout (#44966)

* Bump zwave-js-server-python to 0.5.0 (#44975)

* Remove stale callback signal from zwave_js (#44994)

* Add light platform to zwave_js integration (#44974)

* add light platform

* styling fix

* fix type hint

* Fix typing

* Update homeassistant/components/zwave_js/const.py

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

* Update homeassistant/components/zwave_js/entity.py

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

* Update homeassistant/components/zwave_js/entity.py

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

* Update homeassistant/components/zwave_js/entity.py

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

* Update homeassistant/components/zwave_js/entity.py

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

* Update homeassistant/components/zwave_js/entity.py

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

* color temp should be integer

* guard Nonetype error

* Update homeassistant/components/zwave_js/light.py

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

* Update homeassistant/components/zwave_js/light.py

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

* some fixes after merging

* add additional guards for None values

* adjustments for rgb lights

* Fix typing

* Fix black

* Bump zwave-js-server-python to 0.6.0

* guard value updated log

* remove value_id lookup as its no longer needed

* fiz sending white value

* Update homeassistant/components/zwave_js/light.py

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

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

* Add zwave_js test foundation (#44983)

* Exclude text files from codespell

* Add basic dump fixture

* Add test foundation

* Fix test after rebase

* Exclude jsonl files from codespell

* Rename fixture file type to jsonl

* Update fixture path

* Fix stale docstring

* Add controller state json fixture

* Add multisensor 6 state json fixture

* Update fixtures

* Remove basic dump fixture

* Fix fixtures after library bump

* Update codeowner

* Minor cleanup Z-Wave JS (#45021)

* Update zwave_js device_info (#45023)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-01-11 00:08:25 +01:00
Ryan Fleming 1402e7ae56
Use the camera UUID as the entity unique id (#44937) 2021-01-10 23:23:32 +01:00
J. Nick Koston f5b389faa8
Warn users when their HomeKit configuration may be unstable (#44999) 2021-01-10 09:38:41 -10:00
J. Nick Koston 4b54694c5c
Add config flow for somfy_mylink (#44977)
* Add config flow for somfy_mylink

* fix typo
2021-01-10 20:24:22 +01:00
J. Nick Koston b450d4c135
Improve unifi performance with many devices (#45006)
With 250 clients, there were about 18000 timers updated every
minute. To avoid this, we check which entities should be set
to not_home only once every second.
2021-01-10 20:12:21 +01:00
Olivier Cloirec 707a8e62f9
Add stop support to openzwave (mqtt) cover (#44622)
* feat: add stop to openzwave (mqtt) cover

* Fix isort and black linter

* Remove supported_features for cover.

As suggested by @MartinHjelmare, not needed anymore because base class
implementation is sufficient.

https://github.com/home-assistant/core/pull/44622#discussion_r549854542

* Make a simpler version depending on idempotency

qt-openzwave already implements idempotency, see:
77e414217f/qt-openzwave/source/qtozwvalueidmodel.cpp (L180)

We can use it and trigger button release anywhen.

* Clean up

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-10 18:05:52 +01:00
Martin Hjelmare 8b72324ae6
Add zwave to ozw migration (#39081)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2021-01-09 15:23:03 +01:00
Erik Montnemery 2d9eb25142
Fix parameters when toggling light (#44950) 2021-01-09 01:10:47 +01:00
Erik Montnemery b85efd343f
Move MQTT entity helpers to separate file (#44838)
* Move MQTT entity helpers to separate file

* Fix imports

* Update MQTT number

* Review comments

* Fix formatting
2021-01-09 00:47:17 +01:00
Diogo Gomes e3c1281616
Add MQTT Number (non optimistic) (#44883)
* non optimistic

* test restored state

* ups

* review

* Ensure the entity is not in optimistic mode

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

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-01-08 23:43:14 +01:00
Sergio Oller 905100a189
Disambiguate Supervisor HTTPUnauthorized on user/password validation (#44940)
* Disambiguate HTTPUnauthorized on user/password validation

The HA core API usually returns 401 when the request does not
have proper authentication tokens or they have expired.

However the user/password validation endpoint may also return
401 when the given user/password is invalid.

The supervisor is currently unable to distinguish both scenarios,
and it needs to.

See https://github.com/home-assistant/supervisor/issues/2408

* Return 404 if user& password are not found/valid

* Fix test for invalid user/password
2021-01-08 17:28:22 +01:00
Joakim Sørensen d99bc99d9b
Prefix versions in system health (#44921)
* Prefix versions in system health

* Adjust test

* Update homeassistant/components/hassio/strings.json
2021-01-08 16:03:06 +01:00
J. Nick Koston 7c93a11aba
Fix wait_template incorrectly matching falsey values (#44938) 2021-01-08 13:07:50 +01:00
Michael Chisholm e35e460e69
Use parent_id to find cause of logbook events with new contexts (#44416)
* Use parent_id to find cause of events with new contexts

When looking up the causing event for logbook display, use the `parent_id`
of the current context if the current context just points back to the
current event.

This now shows in the logbook the cause of an event in the case that a
component has created a new context from an existing context and tied
them together via the `Context.parent_id`.

* Fix exception when parent event not available

* Use async_Log_entry to avoid jump into executor
2021-01-07 20:27:03 -10:00
Jamin Collins 3b184ad11c
Implement support for additional ecobee hold modes (#40520)
* useEndTime2hour   - 2 hours
* useEndTime4hour   - 4 hours
* indefinite        - Until I change it

These changes have been tested with an ecobee3 lite running firmware
version 4.5.81.200

Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
2021-01-07 18:09:22 -10:00
Bouwe Westerdijk cb3b37a87a
Correct Plugwise sensor scaling (#44344)
* Remove sensor-scaling, handled by the back-end

* Correct assert-values

* Update test-fixtures

* Revert "Correct assert-values"

This reverts commit f1a1891f73.

* Adapt value to the updated userdata set

* Link to plugwise v0.8.5, update fixtures

* Correct test-values

* Fix typo
2021-01-08 02:44:00 +01:00
jjlawren 0426b211f6
Rewrite Plex tests to use mocked payloads (#44044) 2021-01-07 19:56:52 +01:00
Paulus Schoutsen caf14b78d1
Homekit has two types (#44879) 2021-01-07 08:44:34 -10:00
Ville Skyttä 2fb3be50ab
Make DeviceRegistry.async_get_device connections arg optional (#44897)
* Make async_get_device connections Optional, default None

* Remove unnecessary async_get_device connections arg usages

Some of these were using an incorrect collection type, which didn't
cause issues mostly just due to luck.
2021-01-07 13:49:45 +01:00
Allen Porter 560e3811a3
Generate nest images thumbnails from events (#44638)
* Capture nest still images from events

Use python google-nest-sdm API for fetching images.  Update home assistant
to use the google-nest-sdm API for fetching the image contents generated
by the server.  This uses the existing websession object for server fetches,
reducing the amount of new code and facilites unit testing using the existing
mechanism.

Simplify tests using the image fetch API rather than a snapshot API
2021-01-06 07:02:04 -08:00
Erik Montnemery 93ae65d704
Improve MQTT number test coverage (#44870) 2021-01-06 13:27:05 +01:00
JeromeHXP 1a65ab0b80
Address late review of ondilo_ico (#44837)
* Updates following comments in PR 44728

* Make all api calls in same thread context

* Set API as parameter to get_all_pools_data

* extract pools data retrieval function to api class
2021-01-06 12:36:39 +01:00
Erik Montnemery 02bfc68842
Support dynamic Google Cast groups (#44484)
* Re-add support for dynamic groups

* Add tests

* Add support for manufacturer

* Refactor support for dynamic groups

* Bump pychromecast to 7.7.0

* Bump pychromecast to 7.7.1

* Tweak tests

* Apply review suggestion
2021-01-06 09:23:18 +01:00
Diogo Gomes f18880686c
Add MQTT Number (#44739)
* Initial Commit

* initial commit

* add discovery and tests

* increase coverage

* address review

* catchup with reality
2021-01-06 08:27:46 +01:00
Paulus Schoutsen 009663602a
Avoid Ps4 doing I/O during tests (#44845) 2021-01-05 21:12:14 +01:00
mvn23 35edc40537
Fix opentherm_gw firmware version in device registry (#44756) 2021-01-05 20:46:54 +01:00
Paulus Schoutsen f1c116831f
Patch Shelly test setting up entry (#44842) 2021-01-05 18:35:54 +01:00
Paulus Schoutsen 69b5176730
Make Alexa custom ID unique (#44839)
* Make Alexa custom ID unique

* Lint

* Lint
2021-01-05 17:35:28 +01:00
Shane Qi c654476e24
Add support for reordering Shopping List Items via Drag and Drop (#41585)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-01-05 11:24:30 +01:00
Mike Keesey 60a1948ab0
Generate switches for harmony activities automatically (#42331)
* Adding switch code for harmony activities

* Working on-off

* Removing poll code for now

* Async updates for current activity

* Update our state based on events

* Notifications we got connected or disconnected

* Remove unncessary constructor arg

* Initial switch tests

* Additional tests for switch transitions

* Test transitions for availability

* Testing switch state changes

* Tests passing

* Final tests

* Updating manifest.

* Correctly mock the return value from a call to the library

* Adding new subscriber classes

* Update class name and location

* Got the refactor working locally.

* Tests passing

* Tracking state changes

* Remove write_to_config_file - this appears to never be read.

It was added far back in the past to account for a harmony library
change, but nothing ever reads that path.

Removing that side effect from tests is a pain - avoid the side effect
completely.

* Connection changes tested

* Clean up temporary code

* Update .coveragerc for harmony component

Specifically exclude untested files instead of the whole module

* Fix linting

* test sending activity change commands by id

* Improving coverage

* Testing channel change commands

* Splitting subscriber logic into it's own class

* Improve coverage and tighten up .coveragerc

* Test cleanups.

* re-add config file writing for harmony remote

* Create fixture for the mock harmonyclient

* Reduce duplication in subscription callbacks

* use async_run_job to call callbacks

* Adding some tests for async behaviors with subscribers.

* async_call_later for delay in marking remote unavailable

* Test disconnection handling in harmony remote

* Early exit if activity not specified

* Use connection state mixin

* Lint fix after rebase

* Fix isort

* super init for ConnectionStateMixin

* Adding @mkeesey to harmony CODEOWNERS
2021-01-04 13:21:14 -10:00
Maciej Bieniek 2e50c1be8e
Add nearest method to get data for Airly integration (#44288)
* Add nearest method

* Add tests

* Move urls to consts

* Simplify config flow

* Fix tests

* Update tests

* Use in instead get

* Fix AirlyError message in tests

* Fix manual update entity tests

* Clean up tests

* Fix after rebase

* Increase test coverage

* Format the code

* Fix after rebase
2021-01-04 23:14:45 +01:00
Shay Levy 76537305e2
Add logbook and device trigger platforms to Shelly (#44020)
* Add logbook and device trigger platforms to Shelly

Add `logbook` platform for describing “shelly.click” event
Add `device_trigger` platform for adding automation based on click events:

Example of logbook event:
Shelly 'single' click event for Test I3 channel 3 was fired.
(Test I3 is the name of the device)

Example of automation triggers:
First button triple clicked
First button long clicked and then single clicked
First button double clicked
First button long clicked
First button single clicked and then long clicked
First button single clicked
Second button triple clicked
..
Second button single clicked

* Fix codespell

* Remove pylint added for debug

* Add tests

* Rebase

* Fix Rebase & Apply PR review suggestions

Fix tests after rebasing
Use `INPUTS_EVENTS_DICT` for input triggers
Apply PR suggestions
2021-01-04 23:10:42 +01:00
JeromeHXP de780c6d35
Add Ondilo ico integration (#44728)
* First implementationof Ondilo component support

* Update manifest toadd pypi pkg dependency

* Update entities name and corrected refresh issue

* Changed percentage unit name

* Corrected merge issues

* Updated coveragerc

* cleaned up code and corrected config flow tests

* Code cleanup and added test for exisitng entry

* Changes following PR comments:
- Inherit CoordinatorEntity instead of Entity
- Merged pools blocking calls into one
- Renamed devices vars to sensors
- Check supported sensor types
- Stop relying on array index position for pools
- Stop relying on attribute position in dict for sensors

* Corrected unit test

* Reformat sensor type check
2021-01-04 08:09:01 -08:00
Allen Porter c92353088c
Fix Fan support in nest climate by adding HVAC_MODE_FAN_ONLY support (#44203)
* Add HVAC_MODE_FAN_ONLY to nest climate

* Remove unreachable code

* Fix HVAC_FAV_ONLY bug; must also turn off hvac
2021-01-04 16:43:41 +01:00
Joakim Plate c1027cace6
Add device entry id to events (#44407)
* Add device entry id to events

* Only add device id if device is known for now
2021-01-04 15:31:10 +01:00
On Freund e9f7e67f4c
Try to fix flaky Risco test (#44788) 2021-01-04 15:23:47 +01:00
Simone Chemelli f07bf6a88e
Cleanup timeouts values for Shelly (#44790)
* Updated timeouts

* Small cleanup

* Fix + small cleanup of test code
2021-01-04 14:04:40 +01:00
Pascal Vizeli a7a4875f52
Add more debug details to running timeouts (#43644)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-01-04 13:10:39 +01:00
Erik Montnemery 34bd70aee6
Fix race when handling MQTT discovery messages (#44730)
* Fix race when handling MQTT discovery messages

* Lint

* retrigger checks
2021-01-04 12:28:17 +01:00
Ville Skyttä 43474762b2
Drop remaining Python < 3.8 support (#44743)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-01-04 11:47:29 +01:00
Álvaro Fernández Rojas ec926105a0
Bump PyTado to 0.10.0 (#44770)
* Bump PyTado to v0.10.0

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Tado: switch to getDeviceInfo

This function has been introduced in version 0.10.0 of PyTado.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Tado: update tests

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-01-04 03:53:15 +01:00
dzukero 2ed7b90027
Add RFXtrx Rfy venetian blinds tilt control (#44309)
* Add tilt control for RFXtrx Rfy venetian blinds

* Update Rfy cover test

* Update the required version of pyRFXtrx

* Update required pyRFXtrx version to 0.26.1

* Revert "Update required pyRFXtrx version to 0.26.1"

This reverts commit d54f1645d5.

* Revert "Update the required version of pyRFXtrx"

This reverts commit ac36d65326.

* Update required version of pyRFXtrx to 0.26.1

* @dzukero
Update required version of pyRFXtrx to 0.26.1

* Make requested changes from review

* Fix isort

* Remove set tilt position support

* Remove set tilt position support per review
2021-01-03 12:59:22 +01:00
Joakim Plate 3de0610909
Support google assistant stopping for assumed state covers (#44266)
* Support stopping for assumed state covers

* Adjust black formatting
2021-01-02 23:01:20 +01:00
Álvaro Fernández Rojas 067f2d0098
Add tado zone binary sensors (#44576)
These should be binary sensors.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-01-02 13:35:59 +01:00
Will Hughes a6e474c7c9
Update surepy to v0.4.0 (#44556)
* Update surepy to v0.4.0

* Clarify pylint disable

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-02 03:52:33 +01:00
Allen Porter 321c0a87ae
Resolve nest pub/sub subscriber token refresh issues (#44686) 2021-01-02 01:51:01 +01:00
Franck Nijhof 508d33a220
Remove deprecated PTVSD integration (#44748) 2021-01-01 23:36:15 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Paulus Schoutsen 2b0556520b
Catch Shelly zeroconf types with uppercase too (#44672)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-01-01 20:54:43 +01:00
Sian 52e1aad008
Correct Dyson climate fan auto mode (#44569)
Co-authored-by: Justin Gauthier <justin@justin-tech.com>
2021-01-01 16:06:36 +01:00
Clifford Roche f0e96f739b
Add turn_on and turn_off to gree climate component (#43207) 2021-01-01 13:58:38 +01:00
Raman Gupta b651f63ef0
Suppress vizio logging API call failures to prevent no-op logs (#44388) 2021-01-01 13:35:05 +01:00
Allen Porter 051f6c0e72
Increase test coverage for Nest SDM integration (#44718) 2021-01-01 13:31:18 +01:00
J. Nick Koston 2ef25e7414
Fix script wait templates with now/utcnow (#44717) 2021-01-01 13:03:34 +01:00
J. Nick Koston 94825b3e15
Do not restore unavailable state for august locks (#44722) 2021-01-01 12:44:53 +01:00
Allen Porter f1dff973dc
Fix broken test test_auto_purge in recorder (#44687)
* Fix failing test due to edge-of-2021 bug

* Rewrite test_auto_purge to make the intent more clear
2020-12-31 12:04:12 -10:00
Allen Porter fe9a254017
Fix legacy nest api binary_sensor initialization (#44674) 2020-12-31 19:22:24 +01:00
Ville Skyttä 1c8fbc7e6a
Upgrade codespell to 2.0.0 (#44695)
* Upgrade codespell to 2.0.0

* Fix newly found spelling errors
2020-12-31 19:14:07 +01:00
Paulus Schoutsen c7bf7b32a2
Zeroconf lowercase (#44675) 2020-12-31 01:06:26 +01:00
J.P. Krauss e37bb51320
Add AirNow Integration (#40091) 2020-12-30 20:25:57 +01:00
zewelor 16ddbb95f4
Add yeelight service to enable disable music mode (#44533)
* Add service to enable / disable music mode

* Black reformat

* Update test

* Fix tests

* Revert consts cleanup

* Use entity method as service call

* Use ATTR for service call

* Sort

* Add tests

* Fix isort

* Fix print

* Black
2020-12-30 17:00:28 +01:00
Allen Porter baacf2cd7d
Publish timestamps in nest events (#44641) 2020-12-30 10:23:48 +01:00
Allen Porter eb07282e9b
Add debug logging for failed OAuth token refreshes to help users diagnose (#44637) 2020-12-30 10:03:27 +01:00
Chris Talkington 12aa537eb9
Support homekit discovery for roku (#44625)
* support homekit discovery for roku

* Update config_flow.py

* Update config_flow.py

* Update test_config_flow.py

* Update __init__.py

* Update __init__.py

* Update strings.json

* Update manifest.json

* Update __init__.py

* Update test_config_flow.py

* Update __init__.py

* Update manifest.json

* Update config_flow.py

* Update config_flow.py

* Update __init__.py

* Update test_config_flow.py

* Update __init__.py

* Update manifest.json

* Update __init__.py

* Update zeroconf.py

* Update config_flow.py

* Update test_config_flow.py

* Update config_flow.py

* Update test_config_flow.py

* Update __init__.py

* Update config_flow.py

* Update test_config_flow.py

* Update manifest.json

* Update zeroconf.py
2020-12-29 20:43:02 -06:00
J. Nick Koston 035f9412ba
Fix template triggers from time events (#44603)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-12-29 23:16:39 +01:00
starkillerOG e287160f72
Add discovery to Motion Blinds (#44615)
* Add discovery to Motion Blinds

* Update test_config_flow.py

* ommit keys()

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

* use _ to indicate private variables

* disregard changes to en.json

* remove unused errors

* clearify multicast=None

* improve tests

* make self._key a local variable

* fix styling

Co-authored-by: Allen Porter <allen.porter@gmail.com>
2020-12-29 11:13:31 -08:00
J. Nick Koston 4905be0c40
Move HomeKit autostart to advanced options flow (#44599) 2020-12-29 13:54:24 +01:00
rikroe e5f31665b1
Add Config Flow to bmw_connected_drive (#39585)
* Add Config Flow to bmw_connected_drive

* Fix checks for bmw_connected_drive

* Adjust code as requested

* Clean .coveragerc after merge

* Use references for config flow

* Fix execute_service check against allowed accounts

* Adjust translation as username can be email or phone no

* Add BMWConnectedDriveBaseEntity mixin, remove unnecessary type casts

* Use BaseEntity correctly, fix pylint error

* Bump bimmer_connected to 0.7.13

* Adjustments for review

* Fix pylint

* Fix loading notify, move vin to entity attrs

* Remove vin from device registry

* Remove commented-out code

* Show tracker warning only if vehicle (currently) doesn't support location

* Remove unnecessary return values & other small adjustments

* Move original hass_config to own domain in hass.data

* Move entries to separate dict in hass.data

* Remove invalid_auth exception handling & test as it cannot happen

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2020-12-29 11:06:12 +01:00
mvn23 0d8ed9061c
Update pyotgw to 1.0b1 (#43352)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-12-28 23:04:17 +01:00
Clifford Roche ee97023053
Add support for Gree device light panels (#42979) 2020-12-28 22:32:04 +01:00
Erik Montnemery ed576edde7
Fix Tasmota device triggers (#44574) 2020-12-28 14:41:39 +01:00
Allen Porter 71af0fac16
Improve nest setup error handling (#44385)
* Improve error handling user experience

This is meant to make the nest integration quieter.  Exceptions are handled with a single log error message.


Co-authored-by: j-stienstra <65826735+j-stienstra@users.noreply.github.com>
2020-12-27 20:30:51 -08:00
Álvaro Fernández Rojas 6d043f2ca1
Tado: add full list of devices (#44475)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2020-12-27 16:36:35 +01:00
Allen Porter 51b88337ca
Simplify nest event handling (#44367)
* Simplify nest event handling

Use device specific update callbacks rather than a global callback.
The motivation is to prepare for a follow up change that will store
camera specific event tokens on the camera itself, so that a service
can later fetch event specific image snapshots, which would be difficult
to send across the event bus.

* Increase nest camera test coverage

* Remove unnecessary device updates for nest cameras

* Remove unused imports

* Fix device id check to look at returned entry

* Remove unused imports after rebase

* Partial revert of nest event simplification

* Push more update logic into the nest library

* Revert nest device_info changes

* Revert test changes to restore global update behavior

* Bump nest library version to support new callback interfaces
2020-12-27 09:49:22 +01:00
Rob Bierbooms 9531b08f2a
Add explicit support for Luxembourg Smarty meter in dsmr integration (#43975)
* Add support for Luxembourg Smarty meter

* Add config flow test

* Add sensor tests
2020-12-27 09:39:36 +01:00
Tim van Cann 1f27fb4644
Fully remove Avri integration (#44478)
* Fully remove Avri integration

* Remove avri from .coveragerc
2020-12-27 09:30:20 +01:00
Eric Severance d912e91e81
Periodically attempt to discover new wemo devices (#44361)
* Periodically attempt to discover new wemo devices

* Set self._stop=None after stopping the periodic discovery task

* Use the async_fire_time_changed test helper to simplify test_discovery

* Stop the pywemo registry outside of the async loop

* Add a comment describing why async_fire_time_changed is used
2020-12-24 12:25:14 +01:00
J. Nick Koston 677fc6e2bb
Translate siri requests to turn on thermostats to valid targets (#44236)
Siri always requests auto mode even when the device does not
support auto which results in the thermostat failing to turn
on as success is assumed.  We now determine the heat cool
target mode based on the current temp, target temp, and
supported modes to ensure the thermostat will reach the
requested target temp.
2020-12-23 17:23:26 -10:00
Diogo Gomes 2d131823ce
Fix filter sensor None state (#44439)
Co-authored-by: Franck Nijhof <frenck@frenck.dev>
2020-12-24 02:24:11 +01:00
starkillerOG 82f9de31b1
Motion Blinds upgrade to local push (#44391)
* Motion Blinds upgrade to local push
2020-12-23 15:15:11 -08:00
Allen Porter 24ccdb55bb
Move Legacy Works With Nest integration to subdirectory (#44368)
* Move Legacy Works With Nest integration to subdirectory

Motivation is to streamline the actively developed integration e.g. make code coverage easier to reason about and simplify __init__.py
2020-12-22 12:42:37 -08:00
Joakim Plate 56b3e0b52e
Support area on entities for google assistant (#44300)
* Support area on entities

* Don't let registry area override config
2020-12-21 21:55:06 +01:00
Emily Mills f89c682ea6
Cleanup and optimization for Zerproc (#44430)
* Cleanup and optimization for Zerproc

* Remove unnecessary extra method

* Add debug log for exceptions on disconnect
2020-12-21 12:50:31 -06:00
Oncleben31 369cf10eb3
Bump meteofrance-api to 1.0.1 (#44389) 2020-12-21 13:49:53 +01:00
Allen Porter 81341bbf91
Handle expiration of nest auth credentials (#44202)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-12-20 01:41:29 +01:00
Emily Mills 4f088dd77a
Connect concurrently to discovered Zerproc lights (#44376)
* Connect concurrently to discovered Zerproc lights

* Add return type to connect_light

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-12-19 13:31:45 -06:00
Aaron Bach 60ecc8282c
Add options flow for Recollect Waste (#44234)
* Add options flow for Recollect Waste

* Add test

* Typing

* Typing

* Typing AGAIN

* Add missing type hints

* Code review

* Code review

* Don't need to block until done
2020-12-19 10:29:37 -07:00
Aaron Bach fbc695e5cf
Fix setup of SimpliSafe options flow test (#44375) 2020-12-19 18:22:34 +01:00
Diogo Gomes b7d4c1826c
Add filter sensor device class from source entity (#44304)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-12-19 17:51:24 +01:00
Emily Mills 9de393d116
Convert zerproc to use new upstream async api (#44357) 2020-12-19 09:35:47 -06:00
Abílio Costa 896f51fd82
Add Wind to Accuweather sensors (#44364) 2020-12-19 16:10:02 +01:00
Ville Skyttä de04a1ed67
Enable more Bandit tests (#44307)
https://bandit.readthedocs.io/en/latest/plugins/index.html#complete-test-plugin-listing
2020-12-19 12:35:13 +01:00
ktnrg45 5b14c1da73
Bump pyps4-2ndscreen to 1.2.0 (#44273)
* Bump PS4 to 1.2.0

* Add additional media_player tests

* Fix tests
2020-12-18 08:46:59 +01:00
Christopher Gramberg c5fdde2a94
Convert filter tests to use pytest style (#41743) 2020-12-17 22:08:35 +01:00
Aaron Bach d18c9f1c74
Update ReCollect docs to use proper name (#44291) 2020-12-17 20:59:45 +01:00
Maciej Bieniek 97894bd718
Refactor Airly config flow (#44330) 2020-12-17 19:34:40 +01:00
Erik Montnemery 31b806ced1
Revert "Change http to auto for cast media image url" (#44327) 2020-12-17 17:43:52 +01:00
Jc2k 2b6842aee0
Fix velux homekit covers not enumerated correctly (#44318) 2020-12-17 17:12:06 +01:00
Maciej Bieniek 94e1f8e631
Refactor Airly tests (#44315) 2020-12-17 16:44:46 +01:00
Paulus Schoutsen 735607c625
Bump version to 2021.1 (#44298) 2020-12-16 23:59:45 +01:00
Dermot Duffy aaae452d58
Add reauth step to Hyperion config flow (#43797)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-12-16 23:55:31 +01:00
Santobert d0ebc00684
Add OAuth to Neato (#44031)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-12-16 23:39:41 +01:00
Shay Levy fd24baa1f6
Fix Shelly devices missing properties field (#44279) 2020-12-16 21:28:59 +01:00
Paulus Schoutsen 4f9d5792ed
Fix setting timestamp on input_datetime (#44274) 2020-12-16 11:18:50 +01:00
Erik Montnemery dfde403937
Remove Home Assistant Cast user when removing entry (#44228)
* Remove Home Assistant Cast user when removing entry

* Fix test

* Fix test
2020-12-16 11:00:22 +01:00
Eric Severance 2765c6f1e9
Register Wemo fan services with entity service helper (#44192)
* Use a singleton for the Wemo registry and fan services

* Undo changes to the wemo subscription registry

* Use an entity service helper to register the Wemo fan services

* Fix Wemo fan test (missing ATTR_ENTITY_ID)

* Use the function name directly rather than a string

* Improve test coverage of the set_humidity service
2020-12-15 14:19:57 +01:00
Eric Severance 69a7eff55d
Add tests for the Wemo __init__ module (#44196)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-12-15 09:59:23 +01:00
Shulyaka 0b8529a472
Add zha AnalogOutput cluster support (#44092)
* Initial commit
* black
* isort
* Commit suggestion from code review
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>

* pylint
* removed entity cache for present_value
* fix discovery
* move write_attributes to channel
* write_attributes fix
* write_attributes yet another fix
* update_before_add=False
* mains powered test device
* removed test_restore_state
* flake8
* removed async_configure_channel_specific
* don't know what this patch does, removing
* test for async_update
* removed node_descriptor
* fix unit_of_measurement
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
2020-12-14 15:32:45 -05:00
Paulus Schoutsen 594e905742
Remove invalidation_version from deprecated (#44156)
* Remove invalidation_version from deprecated. We don't follow up and just hurts releases

* Revert change to ZHA
2020-12-12 22:24:16 +01:00
Allen Porter 1a8123aba6
Increase nest climate test coverage (#44146) 2020-12-12 20:57:02 +01:00
Eric Severance 8fe5e61cbf
Test edge cases in wemo platform code (#44136) 2020-12-12 19:41:20 +01:00
Allen Porter 6d12e764b7
Increase test coverage for nest camera (#44144) 2020-12-12 10:17:43 +01:00
Anders Melchiorsen ce3f6c368a
Initialize numeric_state trigger tests (#44114)
This makes the crossed thresholds explicit.
2020-12-11 05:11:51 +01:00
Eric Severance b4afef1395
Add tests for the wemo component (#44088)
* Add tests for the wemo component.

* Prefer mock tools from tests.async_mock over importing asynctest directly

* Avoid using `entity/entities` except when referring to an `Entity` instance in wemo tests

* Remove the overridden event_loop fixture from the wemo tests

* Patch the library code, not the integration code, in the wemo tests
2020-12-10 22:24:26 +01:00
Erik Montnemery 7084d6c650
Address old review comments of Tasmota fan (#44112)
* Address review comments of Tasmota fan

* Address review comment
2020-12-10 22:17:58 +01:00
Robert Svensson 9651d1bcfa
Support more errors to better do retries in UniFi (#44108) 2020-12-10 21:25:50 +01:00
Alexei Chetroi 6253054fd4
Bump up dependencies on pyserial and pyserial-asyncio (#44089) 2020-12-10 20:41:31 +01:00
Bram Kragten 0da312b6f1
Fix importing blueprint from community (#44104) 2020-12-10 16:45:57 +01:00
Paulus Schoutsen d9a86c1145
Fix importing blueprints from forums with HTML entities (#44098) 2020-12-10 11:11:49 +01:00
zewelor e09234ffae
Fix yeelight unavailbility (#44061) 2020-12-10 09:54:10 +01:00
Robert Svensson e2ef9d1afc
Some lights only support hs, like the lidl christmas lights (#44059) 2020-12-09 19:02:44 +01:00
Robert Svensson 20c3fdfe14
Fix ignored Axis config entries doesn't break set up of new entries (#44062) 2020-12-09 17:48:16 +01:00
J. Nick Koston dd0afc3b66
Create httpx helper to wrap a shared httpx.AsyncClient (#43877)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-12-09 17:18:57 +01:00
Jc2k 109ce653c0
Fix how homekit_controller enumerates Hue remote (#44019) 2020-12-08 18:01:07 +01:00
Paulus Schoutsen ac2af69d26
Fix extracting entity and device IDs from scripts (#44048)
* Fix extracting entity and device IDs from scripts

* Fix extracting from data_template
2020-12-08 13:06:29 +01:00
SukramJ 34a31884b7
Bump dependency to add more multi channel devices to HomematicIP Cloud (#43914) 2020-12-08 00:16:22 +01:00
David F. Mulcahey 70133f2096
Fix ZHA switch group test (#44021) 2020-12-07 11:43:35 -05:00
Jc2k 6ce45e39d1
Hide HomeKit devices from discovery that are known to be problematic (#44014) 2020-12-07 13:51:35 +01:00
PeteBa 727b1d37b6
Add discovery for MQTT device tracker (#42327) 2020-12-07 13:16:56 +01:00
Nigel Rook 1d0b4290fe
Update generic_thermostat current_temperature on startup (#43951)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-12-07 13:14:54 +01:00
nivnoach 906e1ce960
Allow manual configuration of ignored config entries (#43947) 2020-12-07 09:25:04 +01:00
Maciej Bieniek 19389b16e2
Add support for system health to GIOS integration (#43280)
* Add system health support

* Fix docstrings

* Change url to check
2020-12-07 03:50:22 +01:00
Philip Allgaier 18736dbebf
Bump voluptuous to 0.12.1 (#44002)
* Bump voluptuous to 0.12.1

* Adjust MQTT climate test to new error msg
2020-12-07 02:49:36 +01:00
Andreas Wrede 30f73a4962
Add discovery of sensors on DS2409 MicroLan (#43599)
* Add discovery of sensors on DS2409 MicroLan

* Add tests for coupler

* Update tests

* Fix isort

* Clean up

* Move tests to test_sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-12-07 02:09:32 +01:00
Jacob Southard 8b01f681ab
Add target temperature range to homekit_controller (#42817)
* Add support for temperature range in thermostat.
* Add tests for setting temperature range.
* Update Lennox E30/Ecobee 3 tests to reflect new supported feature
* Add support for thermostate mode specific min/max temp values.
2020-12-06 23:23:08 +00:00
Alexei Chetroi a1720fdd2b
Cleanup ZHA fan channel (#43973)
* Use zigpy cached values for ZHA Fan speed

* Disable update_before_add for ZHA fans

* Refresh state of the group

* Fix group tests
2020-12-05 18:24:49 -05:00
Alexei Chetroi 40e5634db3
Add ZHA Coordinator to LightLink cluster groups (#43959)
* Add coordinator to LighLink cluster groups

* Make pylint happy
2020-12-05 11:20:10 -05:00
Robert Svensson bc83e30761
Fix device refresh service can always add devices (#43950) 2020-12-05 11:53:43 +01:00
Allen Porter 0670124e8d
Address PR cleanup for nest device triggers (#43961) 2020-12-05 10:55:19 +01:00
Emily Mills c4426a73b3
Remove zerproc threaded upstream reconnect logic (#43910) 2020-12-05 01:40:56 +01:00
Martin Hjelmare e23dc90bac
Handle stale ozw discovery flow (#43939) 2020-12-04 20:41:08 +01:00
Erik Montnemery 5e6f5fca90
Don't send MQTT birth message in tests (#43917) 2020-12-04 04:39:49 +01:00
Jonas Lundberg a5279cc279
Upgrade respx to 0.16.2 (#43892)
* Bump respx to 0.16.2

* Align sensor tests to use new respx mock api
2020-12-04 04:27:25 +01:00
Erik Montnemery 916ff88774
Bump hatasmota to 0.1.4 (#43912) 2020-12-04 03:16:37 +01:00
Martin Hjelmare 8d33c2092f
Add number entity value property (#43902) 2020-12-03 18:35:17 +01:00
Emily Mills 54cb2d42af
Kulersky cleanups (#43901) 2020-12-03 18:08:16 +01:00
Shulyaka 78a69ef284
Add reproduce state for Number (#43870) 2020-12-03 10:39:50 +01:00
Guido Schmitz 6f2327c6d5
Change config flow unique_id for devolo Home Control (#43005) 2020-12-03 09:10:20 +01:00
SukramJ 40408eb0eb
Add HmIP-HDM1 and HmIPW-DRD3 to Homematic IP Cloud (#43132)
* cleanup const.py

* Add wired multi dimmer HMIPW-DRD3 to Homematic IP Cloud

* Add HmIP-HDM1 to Homematic IP Cloud
2020-12-02 23:56:05 -06:00
Emily Mills 7c83092431
Add Kuler Sky Bluetooth floor lamp integration (#42372)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-12-02 22:28:17 +01:00
Elena Rogleva 7cd17dd94f
Rewrite the kira/test_init.py unittests to pytest style test functions (#42753) 2020-12-02 22:15:53 +01:00