Commit graph

5911 commits

Author SHA1 Message Date
J. Nick Koston
fdc5208d18
Prevent the zeroconf service browser from terminating when a device without any addresses is discovered. (#38094) 2020-07-22 20:21:57 -10:00
Paulus Schoutsen
5583f43030
Clean up fido tests (#38098) 2020-07-22 20:21:32 -10:00
J. Nick Koston
d7811a4adf
Avoid generating a Context() object every second (#38085)
Every second we were calling the getrandom() syscall to generate a uuid4
for a context that will never be looked:

 * In most setups there are no more time_changed listeners

 * The ones that do exist never care about context

 * time_changed events are never saved in the database
2020-07-22 21:52:10 -07:00
Eugene Prystupa
3480fb6996
Refactor bond integration to be completely async (#38066) 2020-07-22 20:22:25 -05:00
Andrew Sayre
ae5c50c1b6
Bump pysmartthings to v0.7.2 (#38086) 2020-07-22 16:01:57 -07:00
Phil Bruckner
65d1dfba62
Update automation logger to include object_id like scripts (#37948) 2020-07-22 10:55:49 -05:00
Phil Bruckner
726d5fdd94
Allow float values in time periods (#38023) 2020-07-21 19:41:42 -05:00
J. Nick Koston
4a5a09a0e9
Speed up group setup (#38048) 2020-07-21 17:29:57 -07:00
Donnie
6e87c2ad3e
Support default transition in light profiles (#36747)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-07-21 17:19:07 -07:00
J. Nick Koston
5cf7b1b1bc
Ensure we do not start discovered flows until after the started event has fired (#38047)
* Ensure we do not start discovered flows until after the start event has fired

This change makes zeroconf and ssdp match discovery behavior of not
creating config flows until the start event has been fired.  This
prevents config flow creation/dependency installs for discovered
config flows from competing for cpu time during startup.

* Start discovery/service browser/ssdp when EVENT_HOMEASSISTANT_STARTED is fired instead of EVENT_HOMEASSISTANT_START
2020-07-21 14:18:43 -10:00
Joakim Plate
7a3c6d6525
Avoid using implementation internal to trigger events (#38041)
This uses the moxking in fixture to trigger events.
2020-07-22 00:24:26 +02:00
Joakim Plate
945acb4e29
Make sure command entities restore from state (#38038) 2020-07-22 00:01:31 +02:00
Rob Bierbooms
ad5d7ee615
Implement unload entry for rfxtrx integration (#38037)
* Implement unload entry

* Change async_remove to remove

* Pop data from hass.data

* Change sequence order in unload

* Dont unload internal when unload platforms fail
2020-07-21 23:43:05 +02:00
J. Nick Koston
4015991622
Update tests that track time to account for microsecond precision (#38044) 2020-07-21 14:22:55 -07:00
Erik Montnemery
fa0e12ffe8
Use keywords for MQTT birth and will (#38040) 2020-07-21 14:10:34 -07:00
Erik Montnemery
908b72370b
Correct arguments to MQTT will_set (#38036) 2020-07-21 12:36:21 -07:00
J. Nick Koston
60009ec2f9
Use event loop scheduling for tracking time patterns (#38021)
* Use event loop scheduling for tracking time patterns

* make patching of time targetable

* patch time tests since time can tick to match during the test

* fix more tests

* time can only move forward

* time can only move forward

* back to 100% coverage

* simplify since the event loop time cannot move backwards

* simplify some more

* revert simplify

* Revert "revert simplify"

This reverts commit bd42f232f6.

* Revert "simplify some more"

This reverts commit 2a6c57d514.

* Revert "simplify since the event loop time cannot move backwards"

This reverts commit 3b13714ef4.

* Attempt another simplify

* time does not move backwards in the last two

* remove next_time <= now check

* fix previous merge error
2020-07-20 20:18:31 -10:00
Patrick
19870ea867
Fix ozw color temp (#38012)
* Fix color temp math

* Ran black --fast

* Update test_light.py

* tweaking mireds

* updating comments

* fixing test_light to match standards

* fixing comments, need coffee
2020-07-20 14:35:30 -04:00
Adam Król
bedb0753f3
Add Wolflink integration (#34104)
* WOLF Smart-set integration

* Removed translations. Changed device class of timestamp. Added new test for unknown exception

* Remove unit_of_measurement from hours sensor

* Code cleanup. Pull Request comments fixes

* ConnectError import change. Removed DEVICE_CLASS_TIMESTAMP

* Add unique id guard with tests. Use common translations. Move device_id resolution to config_flow.

* Remove debug print
2020-07-20 11:52:52 +02:00
Jean-Yves Avenard
36ee9ff58f
Don't advertise switch devices as dimmable lights (#37978)
This issue has been corrected and then reverted multiple times.
It seems that the core issue was a casing one (On/off vs On/Off) ; for better
matching with a real Hue hub, also add the productname.

Tested to work with echo 2 and echo 5.
2020-07-19 22:33:56 -10:00
J. Nick Koston
6ea5c8aed9
Index the device registry (#37990) 2020-07-19 23:32:05 -07:00
J. Nick Koston
890562e3ae
Index the entity registry (#37994) 2020-07-19 22:52:41 -07:00
Jeff Irion
2c3618e2c7
Close androidtv ADB socket connection when Home Assistant stops (#37973)
* Close the ADB connection on HA stop

* Get the test to pass

* Remove unnecessary test code

* Register the callback sooner

* '_async_stop' -> 'async_close'

* 'async_close' method -> '_async_close' function
2020-07-20 02:48:08 +02:00
lawtancool
432cbd3148
Add Control4 integration (#37632)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-07-19 13:48:08 -07:00
Thorjan Knudsvik
e6ff8d6839
Adds median to min_max component (#36686) 2020-07-18 16:18:31 -07:00
Joakim Plate
6fa04aa3e3
Add support for InputSelector trait (#35753) 2020-07-18 16:07:32 -07:00
Xiaonan Shen
394194d1e6
Add switch to pi_hole integration (#35605)
Co-authored-by: Ian <vividboarder@gmail.com>
2020-07-17 23:19:01 -07:00
J. Nick Koston
1acdb28cdd
Automatically recover when the sqlite3 database is malformed or corrupted (#37949)
* Validate sqlite database on startup and move away if corruption is detected.

* do not switch context in test -- its all sync
2020-07-17 19:07:37 -10:00
J. Nick Koston
910b6c9c2c
Index entity_registry_updated listeners (#37940) 2020-07-17 21:59:18 -07:00
Shulyaka
9ae08585dc
Add humidifier device triggers (#36887)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-07-17 21:57:52 -07:00
jjlawren
a7dfa60208
Fix Sonos speaker lookup for Plex (#37942) 2020-07-17 18:18:53 -07:00
J. Nick Koston
1582e4347d
Mock out I/O in the default_config test (#37897)
This test never passed locally because of the I/O.
2020-07-17 18:17:40 -07:00
Ivan Belokobylskiy
cecdce07cc
Fix Yandex transport Integration, add signature to requests (#37365) 2020-07-17 12:55:30 -07:00
Shulyaka
cee136ec55
Add humidifier device conditions (#36962) 2020-07-17 11:33:52 -07:00
Shulyaka
7c9ef39ef6
Add humidifier intents (#37335)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-07-17 11:20:34 -07:00
Marcel van der Veldt
24ed932b01
Add ozw support for single setpoint thermostat devices (#37713)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-07-17 14:25:16 +02:00
J. Nick Koston
f5b628c04f
Cleanup logbook tests to prevent failure on race condition (#37928) 2020-07-16 21:48:22 -07:00
J. Nick Koston
fa4e9c0485
Increase test line coverage of homeassistant/helpers/event.py to 100% (#37927)
* Increase test line coverage of homeassistant/helpers/event.py to 100%

* fix test
2020-07-16 21:47:53 -07:00
Chris
a6129467aa
Add RGB light support to ozw (#37636) 2020-07-16 18:10:36 -07:00
Perry Naseck
93919dea88
Add Firmata Integration (attempt 2) (#35591) 2020-07-16 17:58:45 -07:00
J. Nick Koston
b6befa2e83
Ensure a state change tracker setup from inside a state change listener does not fire immediately (#37924)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-07-16 17:50:06 -07:00
Alexei Chetroi
33dc015083
Fix ZHA electrical measurement sensor initialization (#37915)
* Refactor cached ZHA channel reads.

If doing a cached ZCL attribute read, do "only_from_cache" read for
battery operated devices only. Mains operated devices will do a network
read in case of a cache miss.

* Use cached attributes for ZHA electrical measurement

* Bump up ZHA zigpy dependency.
2020-07-16 16:25:42 -04:00
Eugene Prystupa
37a70c73a5
Improve bond startup performance (#37900) 2020-07-16 10:31:15 -05:00
mdegat01
16e5d02794
Add ignore_attributes option to influxdb (#37747)
* Added ignore_attributes option and tests

* adjusted config for overlapping customization with ignore attrs
2020-07-16 09:42:02 +02:00
Eugene Prystupa
0bfcd8c2ab
Refactor bond tests (#37868) 2020-07-15 15:49:58 -05:00
J. Nick Koston
9db6318122
Remove support for legacy logbook events created before 0.112 (#37822)
* Remove support for legacy logbook events created before 0.112

Reduce the complexity of the logbook code.  This
should also have a small performance boost.

* None is the default
2020-07-15 10:38:08 -10:00
Pascal Vizeli
f4c3f5d074
Revert breaking change for Automation (#37885)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-07-15 20:38:29 +02:00
J. Nick Koston
abe3e3094e
Provide workaround for missing/disabled/broken IPv6 (#37887) 2020-07-15 11:26:40 -07:00
Phil
21649244e9 Update per review 3 2020-07-15 16:58:42 +00:00
Phil
741c702ff3 Add tests 2020-07-15 16:58:42 +00:00