Commit Graph

4115 Commits (1615a5ee81fde04e0722da2842059b81126a0250)

Author SHA1 Message Date
Paulus Schoutsen 1615a5ee81
Use unique_id in Plex config entries (#32489) 2020-03-04 21:42:48 -08:00
Paulus Schoutsen 81f99efda1
Mock all invocations of coronavirus.get_cases (#32487) 2020-03-04 21:42:07 -08:00
Paulus Schoutsen 81810dd920
Modernize WWLLN config flow (#32194)
* Modernize WWLLN config flow

* Code review

* Update tests
2020-03-04 18:23:00 -08:00
Paulus Schoutsen b848c97211
Add soundtouch attributes exposing multiroom zone info (#28298)
* [soundtouch] workaround for API bug when removing multiple slaves from a zone at once

* [soundtouch] added additional attributes exposing multiroom zone info

* Fix update with slave entities

* Add zone attributes test

* Fix and clean up tests

* Fix typo

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-04 17:53:15 -08:00
Paulus Schoutsen eac1f029e5
Allow string values on zwave.set_node_value (#31061)
* Allow string values on zwave.set_node_value

This allows for:

* Accessing longer value_ids. In some cases, value ids in z-wave nodes are very large (17 digits in my case). Passing them as int does not seem to work well (python probably truncates the number), but passing them as string works fine
* Changing color values, which are represented as hex string

reformat test

* update services.yaml with string set_node_value
2020-03-04 17:40:58 -08:00
Paulus Schoutsen 3ca97a0517
Add sighthound timestamped file (#32202)
* Update image_processing.py

Adds save timestamp file and adds last_detection attribute

* Update test_image_processing.py

Adds test

* Adds assert pil_img.save.call_args

* Test timestamp filename

* Add test bad data

* Update test_image_processing.py

* Fix bad image data test

* Update homeassistant/components/sighthound/image_processing.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-03-04 17:31:54 -08:00
Alexei Chetroi e416f17e4d
ZHA: Successful pairing feedback (#32456) 2020-03-04 19:27:37 -05:00
Paulus Schoutsen 2abdfc9da6
GeoNet NZ Quakes code improvements (#32338)
* code quality improvements

* code quality improvements and fixed tests

* explicitly set unique ids

* improve unique id creation

* remove entities from entity registry

* added test for removing entities from entity registry

* revert entity registry handling from sensor and test code

* check for entity registry removal in geolocation test case

* make import absolute; isort

* change quality scale
2020-03-04 14:52:16 -08:00
Paulus Schoutsen dd7d8d4792
Remove 'show all controls' option for Plex (#32391) 2020-03-04 14:42:50 -08:00
Paulus Schoutsen 0763dc6089
Fix filter sensor processing states that aren't numbers (#32453)
* lint

* only_numbers flag
2020-03-04 12:47:53 -08:00
Alexei Chetroi 20333703c5
Remove ZHA attribute listening channel (#32468)
* remove AttributeListeningChannel
* pull sleeps
* update signature to fix pylint
2020-03-04 13:11:53 -05:00
J. Nick Koston 7f91501a36
Use a requests Session for rest sensors (#32463)
This avoids the ssl setup overhead for each request
2020-03-04 08:32:38 -08:00
Paulus Schoutsen b27c46750c
Update error handling in update coordinator (#32452) 2020-03-04 08:05:46 -08:00
Raman Gupta 4f619691df
Add is_volume_muted property to vizio integration (#32332)
* add is_muted property and update tests

* black

* manually set is_muted on async_mute_volume calls to set state early

* combine two lines into one

* set is_muted to None when device is not on
2020-03-04 10:04:52 +01:00
Paulus Schoutsen 7678d66464
Fix device tracker TrackerEntity defaults (#32459) 2020-03-04 09:43:52 +01:00
Paulus Schoutsen 4cf86262af
Numeric state trigger: validate that above is not above below (#32421)
* Numeric state trigger: validate that above is not above below

* Lint
2020-03-03 17:26:44 -08:00
Paulus Schoutsen fed23030d6
Filter out duplicate logbook states (#32427) 2020-03-03 13:56:32 -08:00
Paulus Schoutsen 8f6651af3d
Update system log grouping (#32367) 2020-03-03 13:55:15 -08:00
Alexei Chetroi 896df9267a
Fix ZHA device healthcheck pings (#32425) 2020-03-03 13:37:17 -05:00
Paulus Schoutsen c62961f40c
Add unique ID to coronavirus (#32423) 2020-03-02 18:10:38 -08:00
Paulus Schoutsen fcbea47c74
Coronavirus updates (#32417)
* Sort countries alphabetically

* Update sensor name

* Add migration to stable unique IDs

* Update sensor.py
2020-03-02 17:59:32 -08:00
Paulus Schoutsen 1603f7ac21
Add coronavirus integration (#32413)
* Add coronavirus integration

* Update homeassistant/components/coronavirus/manifest.json

Co-Authored-By: Franck Nijhof <git@frenck.dev>

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-03-02 13:40:11 -08:00
jjlawren df3f7687d4
Refactor Certificate Expiry Sensor (#32066)
* Cert Expiry refactor

* Unused parameter

* Reduce delay

* Deprecate 'name' config

* Use config entry unique_id

* Fix logic bugs found with tests

* Rewrite tests to use config flow core interfaces, validate created sensors

* Update strings

* Minor consistency fix

* Review fixes, complete test coverage

* Move error handling to helper

* Subclass exceptions

* Better tests

* Use first object reference

* Fix docstring
2020-03-02 07:44:24 -06:00
J. Nick Koston 7ca4665711
Move keypad battery implementation details into py-august (#32349)
* Move keypad battery implementation details into py-august

* Upgrade to py-august 0.22.0 which also adds gen2 doorbell battery data

* remove cruft from previous refactor
2020-03-01 23:22:28 -08:00
J. Nick Koston 924c313c8a
Add application/xml as an XML to JSON auto converted mime type… (#32289)
* Resolves issue #32280
2020-03-01 23:22:01 -08:00
Ziv e13d5bdc10
Refactor dynalite integration for multi-platform (#32335)
* refactoring for multi platform

* adopted test_bridge to refactoring

* refactoring tests for multi-platform
additional coverage in config and init

* comment for clarity

* more specific imports from lib

* library version bump

* removed async_update

* changed parameter order to start with hass

* removed pylint disable

* unsubscribe from signal dispatcher
inherit from Entity

* use device.unique_id

* changed hass_obj to hass

* added test for remove entity
bug fix from the test

* removed the polling try_connect. hate polling... it is now part of the async_setup()
significantly makes the code clearer and simplifies the tests

* removed leftover debug logs in the library

* changed tests to get the entry_id from hass

* changed place to assign hass.data only after success

* fixes for test_init

* removed assert

* removed device_info

* removed bridge internal from common

* modified test_bridge to work without the bridge directly

* removed bridge from test_existing_update

* changed update to not use bridge internals

* dyn_bridge fixture no longer used - removed
2020-03-01 22:44:24 +01:00
Paulus Schoutsen c6e85cac0b
Require IFTTT to send data as dictionary (#32317)
* Require IFTTT to send data as dictionary

* Update logging
2020-02-29 20:37:06 -08:00
Robert Chmielowiec 8e3492d4f5
ZHA: Support light flashing (#32234) 2020-02-29 18:37:06 -05:00
Erik Montnemery c4ac3155e4
Add brightness to light device turn_on action (#32219)
* Add support for setting brightness

* Remove default brightness
2020-02-29 13:33:20 +01:00
J. Nick Koston be14b94705
Restore august lock changed_by state on restart (#32340)
* Various code review items from previous PRs

* Add a test for fetching the doorbell camera image

* Switch to using UNIT_PERCENTAGE for battery charge unit

* Add tests for changed_by
2020-02-29 12:12:50 +01:00
Aaron Bach e9a7b66df6
Add config entry for AirVisual (#32072)
* Add config entry for AirVisual

* Update coverage

* Catch invalid API key from config schema

* Rename geographies to stations

* Revert "Rename geographies to stations"

This reverts commit 5477f89c24cb3f58965351985b1021fc5fc794a5.

* Update strings

* Update CONNECTION_CLASS

* Remove options (subsequent PR)

* Handle import step separately

* Code review comments and simplification

* Move default geography logic to config flow

* Register domain in config flow init

* Add tests

* Update strings

* Bump requirements

* Update homeassistant/components/airvisual/config_flow.py

* Update homeassistant/components/airvisual/config_flow.py

* Make schemas stricter

* Linting

* Linting

* Code review comments

* Put config flow unique ID logic into a method

* Fix tests

* Streamline

* Linting

* show_on_map in options with default value

* Code review comments

* Default options

* Update tests

* Test update

* Move config entry into data object (in prep for options flow)

* Empty commit to re-trigger build
2020-02-28 20:14:17 -07:00
Alexei Chetroi 0670b4f457
Use collection helpers for counter integration (#32295)
* Refactor counter to use config dict.

* Use collection helpers for counter integration.

* Update tests.

* Use callbacks were applicable.
2020-02-28 14:06:39 -08:00
Paulus Schoutsen deda2f86e7
Allow managing Lovelace storage dashboards (#32241)
* Allow managing Lovelace storage dashboards

* Make sure we do not allow duplicate url paths

* Allow setting sidebar to None

* Fix tests

* Delete storage file on delete

* List all dashboards
2020-02-28 12:43:17 -08:00
springstan f1a0ca7cd3
Add and use percentage constant (#32094)
* Add and use percentage constant

* Fix pylint error and broken test
2020-02-28 11:46:48 -08:00
J. Nick Koston c7f128f286
Ensure rest sensors are marked unavailable when http requests… (#32309) 2020-02-28 11:41:41 -08:00
Paulus Schoutsen 601f2c693d
Prevent saving/deleting Lovelace config in safe mode (#32319) 2020-02-28 11:12:16 -08:00
springstan 157f972d72
Use f-strings in integrations starting with "H" - "L" (#32265)
* Use f-strings in integrations starting with "H"

* Use f-strings in integrations starting with "I"

* Use f-strings in integrations starting with "J"

* Use f-strings in integrations starting with "K"

* Use f-strings in integrations starting with "L"

* Fix lint error

* Use join instead of f-string in homekit_controller

* Use local variables with f-strings

* Fix lint error

* Escape the characters in f-string

* Sort imports with isort in homeworks light

* Fix pylint error

* Fix broken tests

* Fix broken tests v2
2020-02-28 12:39:29 +01:00
Ziv 02c170b961
Dynalite listener for config entry update (#32116)
* added entry listener that reloads the component

* fixed update with existing entry

* fixed import in test

* fixes

* library version

* removed unique_id

* fix

* fixed for no entries in hass.data

* fixed return value on abort

* moved to use async_entries

* removed unused import
2020-02-27 22:05:55 -08:00
Raman Gupta b9fa32444a
Support vizio pairing through config flow (#31520)
* support pairing through config flow

* simplify import failure log messages

* remove unnecessary list comprehension

* bump pyvizio to add passing ClientSession in where it was missed

* show different message if user completes pairing through import

* remove dupe failure message since reasons for failure are the same in both instances

* remove extra constant

* add host reachability check during pairing workflow

* revert redundant connection check since check is implicitly done during pairing process

* fix rebase errors

* fix string

* updates based on review

* update docstring

* missed commit

* update import confirmation message to be less wordy

* use ConfigFlow _abort_if_unique_id_configured

* fix test
2020-02-27 22:04:59 -08:00
Erik Montnemery 3b17e570df
Add device actions to cover (#28064)
* Add device actions to cover

* Remove toggle action, improve tests

* lint

* lint

* Simplify actions

* Update homeassistant/components/cover/device_action.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Improve tests

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-27 21:05:43 -08:00
J. Nick Koston 223c01d842
Coordinate all august detail and activity updates (#32249)
* Removing polling from august

* Now using subscribers to the detail and activity

* Fix hash to list keys

* continue to the next house if one fails

* Add async_signal_device_id_update

* Fix double initial update

* Handle self.hass not being available until after async_added_to_hass

* Remove not needed await

* Fix regression with device name
2020-02-27 19:44:22 -08:00
Jens Nistler ecd076c5e4
Mark clients away if they have never been seen. (#32222) 2020-02-27 11:50:34 -08:00
Yuki Ueda 0eb5ca67cd
Make heos and transmission config flow tests more robust (#31783)
* async_step_user to async_configure

* fix for lint

* fix for pylint

* fix isort and black

* fix miss-fixed black

* fixing for the python37 coverage

* fix transmission definition

* fix for Black formatting

* fix type to abort

* clean up

* clean up for the test

* fix for the test

* refactor

* split test_flow_works to three tests

* revert the assert

* remove whitespaces for flake8

* apply patch function

* fix for the patch

* fix for the black

* remove mock_coro

* fix for the black

* hue to heos

* try to fix import

* fix for the black

* revert try to fix import

* Add a pytest fixture

* fix for the black
2020-02-27 12:19:54 +01:00
J. Nick Koston 4c5e364d90
Centralize august activity updates (#32197)
* Reduce August doorbell detail updates

* Doorbell images now get updates from the activity feed

* Tests for activity updates

* py-august now provides bridge_is_online for available state

* py-august now provides is_standby for available state

* py-august now provides get_doorbell_image (eliminate requests)

* remove debug

* black after merge conflict

* Centralize august activity updates

* Updates appear significantly more responsive

* Should address the community complaints about "lag"

* Reduce detail updates (device end points) to one hour interval

* Signal entities to update via dispatcher when new activity arrives

* Resolves out of sync state (skipped test is now unskipped)

* pylint

* fix merge conflict

* review comments

* Remove stray

* Address review items that can be done without refactor
2020-02-26 18:48:44 -08:00
Jc2k d207c37c33
Address homekit_controller feedback on #32212 and #32213 (#32228) 2020-02-26 17:10:05 -08:00
dupondje f26826d949
Fix DSMR 5 (#32233)
DSMR 5 was broken because some wrong if.
if dsmr_version in ("5B"):
-> this checks dsmr_version against 5 and B. Not if its 5B.
2020-02-26 17:02:42 -08:00
Paulus Schoutsen 483d822272
Lovelace resource mgmt (#32224)
* Add websockets commands for resource management

* Add LL resource management

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-02-26 16:43:34 -08:00
Jc2k 853d6cda25
Make homekit_controller a local push integration (#32213) 2020-02-26 10:35:53 -08:00
Jc2k 92a47f14bb
homekit_controller test cleanups (#32212) 2020-02-26 09:44:04 -08:00
J. Nick Koston 638a3025df
Reduce August doorbell detail updates (#32193)
* Reduce August doorbell detail updates

* Doorbell images now get updates from the activity feed

* Tests for activity updates

* py-august now provides bridge_is_online for available state

* py-august now provides is_standby for available state

* py-august now provides get_doorbell_image (eliminate requests)

* remove debug

* black after merge conflict
2020-02-26 08:43:41 +01:00