Commit Graph
5819 Commits
Author SHA1 Message Date
Aaron Bach 5f6bd22f18 Remove leftover print statement (#38163) 2020-07-24 16:11:02 +02:00
Thomas DelaetandMartin Hjelmare 3ff5c17009 Support unavailable state in template fan (#38114)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-07-24 15:48:07 +02:00
Erik Montnemery 686e6b8fc3 Add test (#37890) 2020-07-24 12:29:19 +02:00
Phil Bruckner 2f87da8aa9 Fix script repeat variable lifetime (#38124) 2020-07-23 23:11:21 -07:00
J. Nick Koston a7459b3126 Log which task is blocking startup when debug logging is on (#38134)
* Log which task is blocking startup when debug logging for homeassistant.core is on

* test needs to go one level deeper now
2020-07-23 20:03:42 -06:00
Aaron BachandMartin Hjelmare a5b7a2c228 Fix SimpliSafe to work with new MFA (#38097)
* Fix SimpliSafe to work with new MFA

* Code review (part 1)

* Input needed from Martin

* Code review

* Code review

* Restore YAML

* Tests

* Code review

* Remove JSON patching in tests

* Add reauth test

* One more reauth test

* Don't abuse the word "conf"

* Update homeassistant/components/simplisafe/config_flow.py

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

* Test coverage

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-07-23 20:02:29 -06:00
Rob Bierbooms 0e0f61764a Fix updates of Rssi for control devices in rfxtrx (#38131)
* Change entity to entity_info

* Fix bug in RSSI for Control devices
2020-07-24 01:49:46 +02:00
Eugenio Panadero 8cfffd00d6 Fix state automation trigger (#38014) (#38032)
for scenarios of enabling/disabling (~ creating/removing) entities,
so it does not trigger in removal if a `to: xxx` is defined, and also
does not trigger in creation if a `from: xxx` is present.
2020-07-23 14:17:11 -05:00
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
DonnieandPaulus Schoutsen 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 bd42f232f6f4e0876fbfe7ce5abf363779761acd.

* Revert "simplify some more"

This reverts commit 2a6c57d51487d4fc85140033a5cadbc800e61287.

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

This reverts commit 3b13714ef489b5c5661ae0254b12f137d047fc26.

* 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
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 ShenandIan 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
ShulyakaandPaulus Schoutsen 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
ShulyakaandPaulus Schoutsen 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 VeldtandPaulus Schoutsen 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 KostonandPaulus Schoutsen 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