Commit Graph

7949 Commits (3cd40ac79c981b8cf090e114d3fedfdd7a0d2078)

Author SHA1 Message Date
amitfin f8690c29cd
Bump libhdate dependency (#48695) 2021-04-10 17:20:08 +02:00
Marc Mueller 1a38d2089d
Bump python-typing-update to v0.3.3 (#48992)
* Bump python-typing-update to 0.3.3
* Changes after update
2021-04-10 15:21:11 +02:00
Erik Montnemery 7e4be921a8
Add helper to get an entity's supported features (#48825)
* Add helper to check entity's supported features

* Move get_supported_features to helpers/entity.py, add tests

* Fix error handling and improve tests
2021-04-10 08:19:16 +02:00
J. Nick Koston 4cd7f9bd8b
Raise ConfigEntryAuthFailed during setup or coordinator update to start reauth (#48962) 2021-04-09 19:41:29 -10:00
Jason 7cc857a298
Add custom JSONEncoder for subscribe_trigger WS endpoint (#48664) 2021-04-09 20:47:10 -07:00
Shay Levy 98396e13af
Fix Shelly button device triggers (#48974) 2021-04-09 16:58:44 -07:00
J. Nick Koston 9b0b2d9168
Prevent ping id allocation conflict with device_tracker (#48969)
* Prevent ping id allocation conflict with device_tracker

- Solves id conflict resulting unexpected home state

* Update homeassistant/components/ping/device_tracker.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-04-09 16:56:15 -07:00
Jan Bouwhuis 28ad5b5514
Implement percentage_step and preset_mode is not not speed fix for MQTT fan (#48951) 2021-04-09 16:14:48 -07:00
Joakim Sørensen eef7faa1e4
Add TTS engines in config.components (#48939)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-04-09 16:13:07 -07:00
Erik Montnemery 16196e2e16
Don't log template errors from developer tool (#48933) 2021-04-09 12:10:02 -07:00
Philip Allgaier 7e2c8a2737
Fix "notify.events" trim() issue + add initial tests (#48928)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-04-09 10:36:13 -07:00
J. Nick Koston 40450b9cfd
Detach aiohttp.ClientSession created by config entry setup on unload (#48908) 2021-04-09 10:14:33 -07:00
Marc Mueller 8e2b5b36b5
Bump pyupgrade to 2.12.0 (#48943) 2021-04-09 09:58:27 -07:00
RenierM26 155322584d
Update Ezviz Component (#45722)
* Update Ezviz Component

* Update Ezviz for pylint test

* Update Ezviz component pylint tests

* Update Ezviz component tests

* Update Ezviz Component tests

* Update Ezviz component pylint error

* Fix ezviz component config flow tests

* Update ezviz component

* Update Ezviz component

* Add sensor platforms

* issue with requirements file

* Update binary_sensor to include switches

* Updates to Ezviz sensors

* Removed enum private method.

* Fix switch args

* Update homeassistant/components/ezviz/switch.py

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

* config flow checks login info

* Config_flow now imports ezviz from camera platform

* Update test

* Updated config_flow with unique_id and remove period from logging

* Added two camera services and clarified service descryptions in services.yaml

* Fixed variable name mistake with new service

* Added french integration translation

* Config_flow add camera rtsp credentials as seperate entities, with user step and import step

* rerun hassfest after rebase

* Removed region from legacy config schema, removed logging in camera platform setup that could contain credentials, removed unused constant.

* Regenerate requirements

* Fix tests and add config_flow import config test

* Added addition test to config_flow to test successfull camera entity create.

* Add to tests method to end in create entry, config_flow cleanup, use entry instead of entry.data

* Removed all services, sorted platforms in init file.

* Changed RTSP logging to debug from warning. (Forgot to change this before commit)

* Cleanup typing, change platform order, bump pyezviz version

* Added types to entries, allow creation of main entry if deleted by validating existance of type

* Config_flow doesn't store serial under entry data, camera rtsp read from entry and not stored in hass, removed duplicate abort if unique id from config flow

* Fix test of config_flow

* Update tests/components/ezviz/test_config_flow.py

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

* Update tests/components/ezviz/test_config_flow.py

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

* Update tests/components/ezviz/test_config_flow.py

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

* Bumped pyezviz api version, added api pyezvizerror exception raised in api (on HTTPError), cleanup unused imports.

* rebase

* cleanup coordinator, bump pyezviz api version, move async_setup_entry to add entry options to camera entries. (order change)

* Added discovery step in config_flow if cameras detected without rtsp config entry

* Reload main integration after addition or completion of camera rtsp config entry

* Add tests for discovery config_flow, added a few other output asserts

* Camera platform call discover flow with hass.async_create_task. Fixes to config_flow for discovery step

* Fix config_flow discovery, add check to legacy yaml camera platform import, move camera private method to camera import step

* Remove not needed check from config_flow import step.

* Cleanup config_flow

* Added config_flow description for discovered camera

* Reordered description in config_flow confim step.

* Added serial to flow_step description for discovered camera, readded camera attributes for rtsp stream url (allows user to check RTSP cred), added local ip and firmware upgade available.

* Bumped pyezviz version and changed region code to region url. (Russia uses a completly different url). PyEzviz adds a Local IP sensor, removed camera entity attributes.

* Add RSTP describe auth check from API to config_flow

* url as vol.in options in Config_flow

* Config_flow changes to discovery step, added exceptions, fixed tests, added rtsp config validate module mock to test disovery confirm step

* Add test for config_flow step user_camera

* Added tests for abort flow

* Extend tests on custom url flow step

* Fix exceptions in config_flow, fix test for discovery import exception test

* Bump pyezviz api version

* Bump api version, added config_flow function to wake hybernating camera before testing credentials, removed "user camera" step from config flow not needed as cameras are discovered.

* Create pyezviz Api instance for config_flow wake hybernating camera, fixed tests and added fixture to mock method

* Added alarm_control_panel with support to arm/disarm all cameras, fixed camera is available attribute (returns 2 if unavailable, 1 if available)

* Skip ignored entities when setup up camera RTSP stream

* Remove alarm_control_panel, add additional config_flow tests

* Cleanup tests, add tests for discovery_step.

* Add test for config_flow rtsp test step1 exceptions

* Removed redundant except from second step in test RTSP method

* All tests to CREATE or ABORT, added step exception for general HTTP error so user can retry in case of trasient network condition

* Ammended tests with output checks for step_id, error, data, create entry method calls.

* bumped ezviz api now rases library exceptions. Config_flow, coordiantor and init raises library exceptions. Updated test sideeffect for library exceptions

* Bump api version, Create mock ezviz cloud account on discovery tests first to allow more complete testing of step.

* Add abort to rtsp verification method if cloud account was deleted and add tests

* Update tests/components/ezviz/__init__.py

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

* Update homeassistant/components/ezviz/const.py

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

* Update tests/components/ezviz/__init__.py

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

* Update homeassistant/components/ezviz/camera.py

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

* Update homeassistant/components/ezviz/camera.py

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

* Update homeassistant/components/ezviz/camera.py

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

* Update homeassistant/components/ezviz/camera.py

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

* Update homeassistant/components/ezviz/camera.py

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

* Update homeassistant/components/ezviz/camera.py

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

* Undo config import change to password key for yaml, move hass.data.setdefault to async_setup_entry and remove async_setup

* Fixed tests by removing _patch_async_setup as this was removed from init.

* Update homeassistant/components/ezviz/camera.py

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

* Update homeassistant/components/ezviz/camera.py

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

* Update homeassistant/components/ezviz/camera.py

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

* Changed L67 on camera config to complete suggestion for cleanup

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-09 12:39:19 +02:00
amitfin 2391134d26
Update "issur_melacha_in_effect" via time tracking (#42485) 2021-04-09 12:26:55 +02:00
Brandon Rothweiler 52e8c7166b
Allow template covers to have opening and closing states (#47925) 2021-04-09 11:36:02 +02:00
Robert Svensson 31ae121645
Add fixtures for Axis rtsp client and adapt tests to use them (#47901)
* Add a fixture for rtsp client and adapt tests to use it

* Better fixtures for RTSP events and signals
2021-04-09 10:56:53 +02:00
Paulus Schoutsen a59460a233
Test that we do not initialize bad configuration (#48872)
* Test that we do not initialize bad configuration

* Simplify test as we are not calling a service
2021-04-08 22:04:39 +02:00
Erik Montnemery b0aa64d59c
Replace redacted stream recorder credentials with '****' (#48832) 2021-04-08 12:44:17 -07:00
Erik Montnemery 5e8559e3cc
Validate supported_color_modes for MQTT JSON light (#48836) 2021-04-08 12:40:48 -07:00
J. Nick Koston 493bd4cdca
Add manufacturer matching support to zeroconf (#48810)
We plan on matching with _airplay which means we need
to able to limit to specific manufacturers to avoid
generating flows for integrations with the wrong
manufacturer
2021-04-08 09:03:10 -10:00
Raman Gupta 3ca69f5568
Raise an exception when event_type exceeds the max length (#48115)
* raise an exception when event_type exceeds the max length that the recorder supports

* add test

* use max length constant in recorder

* update config entry reloaded service name

* remove exception string function because it's not needed

* increase limit to 64 and revert event name change

* fix test

* assert exception args

* fix test

* add comment about migration
2021-04-08 20:46:28 +02:00
J. Nick Koston 1f80c756ab
Fix subscribe_bootstrap_integrations to send events (#48754) 2021-04-08 07:30:33 -10:00
Laszlo Magyar c7e4857d2c
Let recorder deal with event names longer than 32 chars (#47748) 2021-04-08 07:08:49 -10:00
Raman Gupta 2768f202b6
Check all endpoints for zwave_js.climate fan mode and operating state (#48800)
* Check all endpoints for zwave_js.climate fan mode and operating state

* fix test
2021-04-08 16:53:20 +02:00
J. Nick Koston cdb151e8c9
Remove doorbird recorder test workaround (#48781)
Apparently this is no longer needed
2021-04-07 09:27:47 -10:00
Erik Montnemery 61b38baf2e
Reject nan, inf from generic_thermostat sensor (#48771) 2021-04-07 09:00:42 -07:00
Raman Gupta caaa62a7f9
Clean up google travel time code (#48708) 2021-04-07 12:39:27 +02:00
Erik Montnemery 2555b10d49
Remove login details before logging SQL errors (#48758) 2021-04-07 12:15:56 +02:00
Franck Nijhof 6ec8e17e7b
Do not activate Met.no without setting a Home coordinates (#48741) 2021-04-07 09:39:39 +02:00
Daniel Hjelseth Høyer b558f20ad2
Met.no - only update data if coordinates changed (#48756) 2021-04-07 09:27:58 +02:00
stegm 589f2240b1
New integration for Kostal Plenticore solar inverters (#43404)
* New integration for Kostal Plenticore solar inverters.

* Fix errors from github pipeline.

* Fixed test for py37.

* Add more test for test coverage check.

* Try to fix test coverage check.

* Fix import sort order.

* Try fix test code coverage .

* Mock api client for tests.

* Fix typo.

* Fix order of rebased code from dev.

* Add new data point for home power.

* Modifications to review.
Remove service for write access (for first pull request). Refactor
update coordinator to not use the entity API.

* Fixed mock imports.

* Ignore new python module on coverage.

* Changes after review.

* Fixed unit test because of config title.

* Fixes from review.

* Changes from review (unique id and mocking of tests)

* Use async update method. Change unique id. Remove _dict

* Remove _data field.

* Removed login flag from PlenticoreUpdateCoordinator.

* Removed Dynamic SoC sensor because it should be a binary sensor.

* Remove more sensors because they are binary sensors.
2021-04-07 09:18:07 +02:00
Joakim Sørensen 191c01a611
Add custom integrations to analytics (#48753) 2021-04-06 19:33:08 -07:00
Joakim Sørensen 89f2f458d2
Generate a seperate UUID for the analytics integration (#48742) 2021-04-07 02:34:49 +02:00
Franck Nijhof e63e8b6ffe
Rename hassio config entry title to Supervisor (#48748) 2021-04-07 00:46:47 +02:00
Pascal Reeb fb1444c414
Add doorsensor + coordinator to nuki (#40933)
* implemented coordinator + doorsensor

* added async_unload_entry

* small fixes + reauth_flow

* update function

* black

* define _data inside __init__

* removed unused property

* await on update & coverage for binary_sensor

* keep reauth seperate from validate

* setting entities unavailable when connection goes down

* add unknown error when entity is not present

* override extra_state_attributes()

* removed unnecessary else

* moved to locks & openers variables

* removed doorsensorState attribute

* changed config entry reload to a task

* wait for reload
2021-04-06 21:20:57 +02:00
Erik Montnemery 9f5db2ce3f
Improve warnings on undefined template errors (#48713) 2021-04-06 12:11:42 -07:00
Paulus Schoutsen 09635678bc
Allow reloading top-level template entities (#48733) 2021-04-06 12:10:39 -07:00
Martin Hjelmare ae67f300b2
Fix sync api use in alarm control panel test (#48725) 2021-04-06 16:50:15 +02:00
J. Nick Koston 46b673cdc6
Abort discovery for unsupported doorbird accessories (#48710) 2021-04-06 13:32:14 +02:00
Erik Montnemery 9f2fb37e17
Flag brightness support for MQTT RGB lights (#48718) 2021-04-06 12:39:29 +02:00
J. Nick Koston 2a15ae13a7
Small improvements for emonitor (#48700)
- Check reason for config abort
- Abort if unique id is already configured on user flow
- remove unneeded pylint
2021-04-05 17:22:49 -10:00
Raman Gupta 5305d083ec
Add config flow for Waze Travel Time (#43419)
* Add config flow for Waze Travel Time

* update translations

* setup entry is async

* fix update logic during setup

* support old config method in the interim

* fix requirements

* fix requirements

* add abort string

* changes based on @bdraco review

* fix tests

* add device identifier

* Update homeassistant/components/waze_travel_time/__init__.py

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

* fix tests

* Update homeassistant/components/waze_travel_time/sensor.py

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

* log warning for deprecation message

* PR feedback

* fix tests and bugs

* re-add name to config schema to avoid breaking change

* handle if we get name from config in entry title

* fix name logic

* always set up options with defaults

* Update homeassistant/components/waze_travel_time/sensor.py

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

* Update config_flow.py

* Update sensor.py

* handle options updates by getting options on every update

* patch library instead of sensor

* fixes and make sure first update writes the state

* validate config entry data during config flow and entry setup

* fix input parameters

* fix tests

* invert if statement

* remove unnecessary else

* exclude helpers from coverage

* remove async_setup because it's no longer needed

* fix patch statements

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-05 19:25:52 -04:00
Dylan Gore f3399aa8aa
Add a new weather integration - Met Éireann (#39429)
* Added a new weather integration - Met Éireann

* Fix codespell error

* Update met_eireann to use CoordinatorEntity

* Remove deprecated platform setup

* Fix merge conflict

* Remove unnecessary onboarding/home tracking code

* Use common strings for config flow

* Remove unnecessary code

* Switch to using unique IDs in config flow

* Use constants where possible

* Fix failing tests

* Fix isort errors

* Remove unnecessary DataUpdateCoordinator class

* Add device info

* Explicitly define forecast data

* Disable hourly forecast entity by default

* Update config flow to reflect requested changes

* Cleanup code

* Update entity naming to match other similar components

* Convert forecast time to UTC

* Fix test coverage

* Update test coverage

* Remove elevation conversion

* Update translations for additional clarity

* Remove en-GB translation
2021-04-05 23:23:57 +02:00
Raman Gupta d0b3f76a6f
Add ClimaCell v4 API support (#47575)
* Add ClimaCell v4 API support

* fix tests

* use constants

* fix logic and update tests

* revert accidental changes and enable hourly and nowcast forecast entities in test

* use variable instead of accessing dictionary multiple times

* only grab necessary fields

* add _translate_condition method ot base class

* bump pyclimacell again to fix bug

* switch typehints back to new format

* more typehint fixes

* fix tests

* revert merge conflict change

* handle 'migration' in async_setup_entry so we don't have to bump config entry versions

* parametrize timestep test
2021-04-05 13:39:39 -04:00
J. Nick Koston 12e3bc8101
Provide api to see which integrations are being loaded (#48274)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-04-04 22:11:44 -10:00
J. Nick Koston e925fd2228
Add emonitor integration (#48310)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-04-04 22:11:23 -10:00
J. Nick Koston 94fde73add
Add config flow for enphase envoy (#48517)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-04-04 22:11:06 -10:00
Alexei Chetroi 6204765835
Implement Ignore list for poll control configuration on Ikea devices (#48667)
Co-authored-by: Hmmbob <33529490+hmmbob@users.noreply.github.com>
2021-04-04 21:21:47 -07:00
J. Nick Koston 6dc1414b69
Fix sonos volume always showing 0 (#48685) 2021-04-04 20:26:55 -07:00