1
mirror of https://github.com/home-assistant/core synced 2024-07-27 18:58:57 +02:00
Commit Graph

761 Commits

Author SHA1 Message Date
Oxan van Leeuwen
2127314f9e
Fix typo in codeowners (#53520) 2021-07-26 23:33:15 +02:00
Bram Kragten
fcc6ea7497
Add energy integration (#52001)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
2021-07-26 09:37:37 -07:00
Shay Levy
68bf6194e1
Add myself to webOS TV codeowners (#53428) 2021-07-24 21:45:24 +02:00
sillyfrog
d3e77e00e1
Add Automate Pulse Hub v2 support (#39501)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Sillyfrog <sillyfrog@users.noreply.github.com>
2021-07-22 14:40:33 +02:00
Sergiy Maysak
f009b1442f
Switch wirelesstag to use cloud push (#50984) 2021-07-22 13:40:39 +02:00
cnico
6636e5b737
Flipr integration (#46582)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: cnico <>
2021-07-21 21:35:44 +02:00
Robert Hillis
462db1b4b2
Add config flow to nfandroidtv (#51280)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-21 13:31:54 +02:00
Daniel Hjelseth Høyer
e9ce3c57cd
Adax heaters (#50998)
Co-authored-by: G Johansson <62932417+gjohansson-ST@users.noreply.github.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-21 10:25:46 +02:00
RDFurman
450fdc91e4
Add honeywell config flow (#50731)
* Upgrade honeywell from platform to integration

* Add codeowner and run code formatter

* Add sensors for current indoor temp and humidity

* Fix tests and away temp

* Spring cleaning of honeywell tests

* Add config flow to honeywell integration

* Add config flow test

* Tie in honeywell service update

* Simplify config flow and add import

* Remove unnecessary platform schema

* Clean up based on PR comments

* Use new helper method

* Force single device and fix linter errors

* Address PR feedback

* Update translations

* Change string key and remove logger message

* Always add first device

* Fix test assertion

* Put PLATFORM_SCHEMA back

* Skip code coverage check on honeywell init

* add some tests for honeywell

* Make retry async

* Make device private

* Use _attr_ instead of properties

* Code cleanup from PR feedback

* Fix test and cleanup code

* Make description better

Co-authored-by: Matt Zimmerman <mdz@alcor.net>
2021-07-19 09:44:02 -10:00
Shulyaka
e9948100a7
Add generic hygrostat integration (#36759)
* generic_hygrostat: new integration
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: jan Iversen <jancasacondor@gmail.com>
2021-07-13 13:25:29 +02:00
Raman Gupta
0f076610fd
Add siren platform (#48309)
* Add siren platform

* add more supported flags and an ability to set siren duration

* tone can be int or string

* fix typing

* fix typehinting

* fix typehints

* implement a proposed approach based on discussion

* Address comments

* fix tests

* Small fix

* Update homeassistant/components/demo/siren.py

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

* Update homeassistant/components/demo/siren.py

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

* Update homeassistant/components/demo/siren.py

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

* Update homeassistant/components/demo/siren.py

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

* Update homeassistant/components/demo/siren.py

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

* typing

* use class attributes

* fix naming

* remove device from service description

* Filter out params from turn on service

* fix tests

* fix bugs and tests

* add test

* Combine is_on test with turn on/off/toggle service tests

* Update homeassistant/components/siren/__init__.py

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

* fix filtering of turn_on attributes

* none check

* remove services and attributes for volume level, default duration, and default tone

* Update homeassistant/components/siren/__init__.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/siren/__init__.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/siren/__init__.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* import final

* Update homeassistant/components/siren/__init__.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Fix typing and used TypedDict for service parameters

* remove is_on function

* remove class name redundancy

* remove extra service descriptions

* switch to positive_int

* fix schema for tone

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-07-11 16:51:11 -04:00
J. Nick Koston
e1e3f68d0b
Revert nmap_tracker to 2021.6 version (#52573)
* Revert nmap_tracker to 2021.6 version

- Its unlikely we will be able to solve #52565 before release

* hassfest
2021-07-06 18:28:23 +02:00
Erik Montnemery
3d7fd83ad4
Add home-assistant/core as codeowner for the template integration (#52592) 2021-07-06 17:35:11 +02:00
stefano055415
d8337cf98f
Add Freedompro (#46332)
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-06-30 13:21:06 +02:00
Aaron Bach
a448b72ff9
Remove bachya as 17track.net codeowner (#52262)
* Remove bachya as 17track.net codeowner

* Cleanup
2021-06-28 17:41:02 -06:00
Tom Brien
fd1d110b80
Add config flow for Coinbase (#45354)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-06-28 16:38:12 +02:00
J. Nick Koston
583626a74f
Convert nmap_tracker to be a config flow (#50429) 2021-06-28 12:49:14 +02:00
Klaas Schoute
6b08aebe5f
Add Forecast Solar integration (#52158)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-27 14:05:04 +02:00
Daniel Hjelseth Høyer
b45c8466b4
Surepetcare, Use entity class vars and some clean up (#52205) 2021-06-26 15:40:40 -07:00
Franck Nijhof
780d538bb0
DSMR: Adding myself to the codeowners (#52144) 2021-06-24 11:23:20 +02:00
Jesse Hills
33e2b910c2
Add @jesserockz to ESPHome codeowners (#52115) 2021-06-23 13:10:58 +02:00
Franck Nijhof
054ca1d7ec
Add Select entity component platform (#51849)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-18 11:51:55 +02:00
Artem Draft
db61a773fd
Add remote control platform to BraviaTV (#50845) 2021-06-17 12:33:44 +02:00
Tom Schneider
7e1fec8ee4
Rewrite of Yamaha musiccast integration (#51561)
* Initial commit for new musiccast integration

* Add zone support

* Get/set volume level

* Remove volume step

* Create custom MusicCastData type

* Create MusicCastDevice

* Fix await

* Add power and mute control

* Implement all basic media_player parts

* Support input switching

* Add duration/position support

* Add advanced tuner functions

* Basic media browser

* Add layer in media browser to see all available list_infos

* Added join/unjoin services and group informations. Known issue: You can not link zone 2 to main at the moment (WIP)

* Many fixes to make multiple zones and grouping work. Next step: implement error handling and remove debugging information

* WIP: Added Multizone Support and allows clients to directly jump from one group to another. Known issue: If a server tries to join a group as client, he has to close his group first. Sometimes the device that was a server previously jumps out of the group directly after joining.

* Updated group management to make it wait for the updated group information before performing the next actions - Timeouts after 1 second, then polls the distribution data. If the data are still not updated, there will be one retry before an Exception is thrown. Extended the state attributes for clients to make them return group details from their servers (leads to inactive group management buttons for the client). Added documentation and restructured the code.

* Make the service handle function name for group specific service calls unique

* Added service descriptions for set_sleep_timer, set_alarm, recall_netusb_preset, store_netusb_preset

* Added data entries for alarm specific values and a netusb preset list. Implemented fetching function for clock and netusb presets.

* Registered and implemented services for set_sleep_timer, set_alarm, recall_netusb_preset, store_netusb_preset. The set_alarm service works with a special mediaplayer alarm lovelace card, I am currently working on.
The NetUSB Presets are also available using the media browser. Maybe we could also add the Tuner presets in the future for both setting up the alarm and recalling them via service and media browser.

* Removed some debug prints

* Moved MusicCast Integration to the aiomusiccast library. This library supports media browsers with multiple pages. Added ssdp support for the discovery

* Minor fix in the group management and tidied up a bit

* Updated manifest of yamaha musiccast

* Update library

* Minor fix in the media browser. get_distribution_num does not have to be async, so it has been changed. Adjusted the client join function to turn on the client before joining a group - the musiccast app does so, so hopefully this fixes the rare errors when adding a turned off client to a group. Some reformating and by hooks fixed most of the requirements of the hooks. Known exception from this: mypy throws an error for line 116.

* Removed some old out commented code. Fixed some error handling, when the user enters a non reachable or non yamaha host in the manual setup. Fixed linting/styling errors. Implemented tests to bring the coverage for the config flow to 100%.

* Fixed linting/styling errors. Return a DeviceInfo object instead of a dict.

* Fixed linting/styling errors. Added a new error type to the translations.

* In the yamaha API the system_id is equal to the serial number in the DLNA description. Due to that it was possible to configure a device twice, because the serial number from the yamaha API was different. This issue was fixed.

* Updated tests and added a test for adding a device manually, which is already present in the system

* Remove print statements

* Fix sleep timer service call

* Fix yamllint error

* Shrink PR down to just new library + config flow with discovery

* Add __init__.py to .coveragerc

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>

* Implement suggestions from code review

* Improve identifiers and connections, remove event loop parameter

* Add coordinator back

* Better exception handling

* Fix unique id in ssdp step

* Remove abc.ABC from MusicCasteDeviceEntity

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

* Update homeassistant/components/yamaha_musiccast/config_flow.py

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

* Replace the repeat mode mapping from mc to ha by a generic solution

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

* add coordinator to the super call of the mediaplayer

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

* add the coordinator to the init function of the MusicCastEntity

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

* Pass the coordinator from the MusicCastEntity init function to the CoordinatorEntity init function

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

* merged _handle_config_flow into async_step_user

* reformated the exception handling of the user step. In the case that the device already exists, the AbortFlow will be raised.

* Removed model from the config entry. It was neither set nor used anymore.

* Fixed the test for the config flow.

* Use async_write_ha_state instead of schedule_update_ha_state.

* Add default value for the system ID gotten in the user step

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

* Update tests/components/yamaha_musiccast/test_config_flow.py

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

* Added a fixture to avoid IO in the test_user_input_device_not_found test

* Use absolute imprt to import data_entry_flow.

* Use local vars for host and serial_number in async_step_user.

* Remove ip_address and zone_id properties.

* Use device id for the unique ID of an entity instead of the macs

* Removed entry_id from the MusicCastEntity init function.

* Updated strings and English translation.

* don't set the coordinator in the mediaplayer init.

* Implemented legacy configuration.yaml support for existing configurations.

* Added tests for the newly added config flow step.

* Use device_id as identifier

* Fix an accidentally relative import

* Fix pylint warnings

* use logger.error instead of logger.exception in the import step.

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

* Use CONF_HOST instead of 'host'

* Only support the import from configuration.yaml if no config entries are setup for musiccast. If there are already config entries in HA and none of them is a representation of a config given in configuration.yaml (e.g. config added after the first import), an error will be logged.

* Update homeassistant/components/yamaha_musiccast/media_player.py

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

* Readded PLATFORM_SCHEMA for configuration.yaml

* Raise an exception for all services, which are only supported for specific sources.

* Bump aiomusiccast to 0.6 to support asyncio sockets

Co-authored-by: Michael Harbarth <michael.harbarth@gmx.de>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-14 08:58:42 +02:00
Franck Nijhof
d021e593d3
Add Ambee integration (#51645) 2021-06-09 13:22:37 +02:00
Brian Towles
01d4140177
Modern Forms integration initial pass - Fan (#51317)
* Modern Forms integration initial pass

* cleanup of typing and nits

* Stripped PR down to Fan only

* Review cleanup

* Set sleep_time to be required for service

* Adjust minimum sleep time to one minute.

* Code review changes

* cleanup icon init a little
2021-06-08 08:22:50 +02:00
gadgetmobile
931ff70ebe
Fix BleBox wLightBoxS and gateBox support (#51367)
Co-authored-by: bbx-jp <83213200+bbx-jp@users.noreply.github.com>
2021-06-02 14:02:37 +02:00
Shay Levy
b6355bcb48
Add myself to Switcher codeowners (#51158) 2021-05-27 17:37:54 +02:00
Adrián Moreno
fe34f42aa5
Add new Meteoclimatic integration (#36906)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-25 13:11:48 +02:00
hesselonline
c497c0eadd
Add wallbox integration (#48082)
* Wallbox component added

* resolved mergeconflicts from upstream

* fixed an incorrect removal in CODEOWNERS file

* fixes for pullrequest automatic test

* clean up code after PR tests

* fixed strings.json

* fix config_flow error > wallbox

* fixed some formatting issues

* fix pylint warnings

* fixed error in number.py > set value

* pylint warnings fixed

* some more pylint fixes

* isort fixes

* fix unused_import pylint

* remove tests

* remove test requirements

* config flow test

* test errors resolved

* test file formatting

* isort on test file

* sensor test

* isort on test

* isort test const

* remove not working sensor test

* remove test const

* add switch, number and lock test

* docstrings for test classes

* sort test_number, create test_sensor

* additional tests

* fix test error

* reduced PR to 1 component

* newline in const

* ignore test coverage -> dependency on external device (wallbox)

* do not ignore config_flow

* add test for validate_input

* remove obsolete import

* additional test config flow

* change test sensor

* docstring

* add additional test for exceptions

* fix test_config

* more tests

* fix test_config_flow

* fixed http error test

* catch connectionerror and introduce testing for this error

* remove .coveragefile

* change comment

* Update homeassistant/components/wallbox/__init__.py

review suggestion by janiversen

Co-authored-by: jan iversen <jancasacondor@gmail.com>

* Update homeassistant/components/wallbox/__init__.py

review suggestion by janiversen (format only)

Co-authored-by: jan iversen <jancasacondor@gmail.com>

* Processed review comments, include more testing for sensor component

* Isolated the async_add_executor_job to make the solution more async

* add a config flow test

* Revert "add a config flow test"

This reverts commit 9c1af82fff.

* Revert "Isolated the async_add_executor_job to make the solution more async"

This reverts commit 0bf034c331.

* Make component more async and add config flow tests

* Changes based on review comments

* made _ methods in WallboxHub for the 'non-async' call to the API and try-catch. Stored the wallbox in the class.

* moved the coordinator to __init__ and pass it as part of the WallboxHub class

* removed obsolete function in __init__

* removed CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL

* fixed spelling and imports on test files

* did isort on component files

Co-authored-by: jan iversen <jancasacondor@gmail.com>
2021-05-24 13:08:24 +02:00
Eduard van Valkenburg
0bba0f07ac
Add SIA Alarm systems (#36625)
* initial commit of SIA integration

* translations

* moved reactions to file, typed everything

* fixed no-else-return 3 times

* refactored config and fix coverage of test

* fix requirements_test

* elimated another platform

* forgot some mentions of sensor

* updated config flow steps, fixed restore and small edits

* fixed pylint

* updated config_flow with better schema, small fixes from review

* final comment and small legibility enhancements

* small fix for pylint

* fixed init

* fixes for botched rebase

* fixed port string

* updated common strings

* rebuild component with eventbus

* fixed pylint and tests

* updates based on review by @bdraco

* updates based on new version of package and reviews

* small updates with latest package

* added raise from

* deleted async_setup from test

* fixed tests

* removed unused code from addititional account step

* fixed typo in strings

* clarification and update to update_data func

* added iot_class to manifest

* fixed entity and unique id setup

* small fix in tests

* improved unique_id semantics and load/unload functions

* added typing in order to fix mypy

* further fixes for typing

* final fixes for mypy

* adding None return types

* fix hub DR identifier

* rebased, added DeviceInfo

* rewrite to clean up and make it easier to read

* replaced functions with format for id and name

* renamed tracker remover small fix in state.setter

* improved readibility of state.setter

* no more state.setter and small updates

* mypy fix

* fixed and improved config flow

* added fixtures to test and other cleaner test code

* removed timeband from config, will reintro in a options flow

* removed timeband from tests

* added options flow for zones and timestamps

* removed type ignore

* replaced mapping with collections.abc
2021-05-24 08:48:28 +02:00
Malte Franken
3141535d69
Bump geojson_client to 0.6 (#50985)
* bump geojson_client library to version 0.6

* add myself as codeowner
2021-05-23 08:55:02 +02:00
J. Nick Koston
e4c77fd336
Bump aiohomekit to 0.2.62 (#50981)
- Discovery is now instant when a ServiceBrowser is running

Changelog: https://github.com/Jc2k/aiohomekit/compare/0.2.61...0.2.62
2021-05-22 22:22:56 -07:00
Simone Chemelli
b9a0fb93eb
Add samsungtv dhcp and zeroconf discovery (#48022)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-05-22 10:41:18 -05:00
G Johansson
6f7ae3727b
Bump yalesmartalarmclient to 0.3.3 (#50613) 2021-05-17 22:39:56 +02:00
Klaas Schoute
e1dd479e15
Add Garages Amsterdam integration (#43157)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-05-15 20:43:12 +02:00
Kevin Eifinger
c220e70008
Add integration kraken (#31114)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-05-14 08:02:11 -07:00
Thomas Schamm
8fcf06a2a9
Add bosch_shc supporting Bosch Smart Home Controller (#34063)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-14 15:03:26 +02:00
J. Nick Koston
1c2692c3c3
Drop nuheat code owner (#50319)
- I no longer have this device
2021-05-13 08:18:37 +02:00
Gleb Sinyavskiy
97eb4c6c62
Add syncthing integration (#38331)
* Scaffold the integration

* Add config flow data schema

* Handle configuration errors

* Get folder states

* Support https

* Fix translations

* Listen to syncthing events in a separate thread

* Bump syncthing

* Automatically reconnect to the syncthing server

* Renames

* Improve loading and unloading

* Update folder states from events

* Refactoring, handle FolderPaused event

* Dynamic folder icons

* Refactoring

* Mark folders as unavailable when senrver is unavailable

* Update folder satus when server is available

* Raise PlatformNotReady

* Implement additional polling

* Stop polling when the server is not available

* Minor fixes

* Remove logging

* Check name uniqueness

* Refactoring

* Minor refactorings

* Bump python-syncthing

* Migrate to aiosyncthing

* Minor fixes

* Update .coveragerc

* Set quality scale

* Bump aiosyncthing, properly handle invalid token

* Fix logging

* Fix logging

* Use CONF_VERIFY_SSL from homeassistant.const

* Bump aiosyncthing. Add Syncthing device

* Fix device name

* Bump aiosyncthing

* Bump aiosyncthing

* Extract SyncthingClient

* Add folder to device_state_attributes

* Do not pass the loop

* Cover config_flow.py

* Move self.async_create_entry outside of the try block

* Raise ConfigEntryNotReady if syncthing server is not reachable

* Fix already configured error message

* Change default name to Syncthing

* Bump aiosyncthing

* Fix formatting

* Fix formatting

* Fix tests

* Fix typo, use lis comprehension

* Fix typo, remove unused CONFIG_SCHEMA

* Bump aiosyncthing

* Remove periods from log messages W0001

* Fix tests

* Black, isort

* Remove empty items from manifest.json

* Fix variable naming

* Remove async_setup

* Use SensorEntity

* Use asyncio.create_task instead of self._hass.loop.create_task

* Do not pass hass to FolderSensor initializer

* Rename device_state_attributes to extra_state_attributes

* Use callbacks

* Simplify tests

* Refactor _listen()

* Use url for the title

* Use the url instead of the name to identify the config entry

* Explicitly set sensor attributes, extract _filter_state

* Use server url instead of name in device_info

* Use server url instead of name in logs

* User server id as a device identifier

* Use URL instead of name to identify config entry

* Use shortened server id instead of name to build entity name and unique id

* Do not use CONF_NAME

* Cleanup unused strings

* Cleanup unused strings

* Add IOT class

* Scaffold the integration

* Add config flow data schema

* Handle configuration errors

* Get folder states

* Support https

* Fix translations

* Listen to syncthing events in a separate thread

* Bump syncthing

* Automatically reconnect to the syncthing server

* Renames

* Improve loading and unloading

* Update folder states from events

* Refactoring, handle FolderPaused event

* Dynamic folder icons

* Refactoring

* Mark folders as unavailable when senrver is unavailable

* Update folder satus when server is available

* Raise PlatformNotReady

* Implement additional polling

* Stop polling when the server is not available

* Minor fixes

* Remove logging

* Check name uniqueness

* Refactoring

* Minor refactorings

* Bump python-syncthing

* Migrate to aiosyncthing

* Minor fixes

* Update .coveragerc

* Set quality scale

* Bump aiosyncthing, properly handle invalid token

* Fix logging

* Fix logging

* Use CONF_VERIFY_SSL from homeassistant.const

* Bump aiosyncthing. Add Syncthing device

* Fix device name

* Bump aiosyncthing

* Bump aiosyncthing

* Extract SyncthingClient

* Add folder to device_state_attributes

* Do not pass the loop

* Cover config_flow.py

* Move self.async_create_entry outside of the try block

* Raise ConfigEntryNotReady if syncthing server is not reachable

* Fix already configured error message

* Change default name to Syncthing

* Bump aiosyncthing

* Fix formatting

* Fix formatting

* Fix tests

* Fix typo, use lis comprehension

* Fix typo, remove unused CONFIG_SCHEMA

* Bump aiosyncthing

* Remove periods from log messages W0001

* Fix tests

* Black, isort

* Remove empty items from manifest.json

* Fix variable naming

* Remove async_setup

* Use SensorEntity

* Use asyncio.create_task instead of self._hass.loop.create_task

* Do not pass hass to FolderSensor initializer

* Rename device_state_attributes to extra_state_attributes

* Use callbacks

* Simplify tests

* Refactor _listen()

* Use url for the title

* Use the url instead of the name to identify the config entry

* Explicitly set sensor attributes, extract _filter_state

* Use server url instead of name in device_info

* Use server url instead of name in logs

* User server id as a device identifier

* Use URL instead of name to identify config entry

* Use shortened server id instead of name to build entity name and unique id

* Do not use CONF_NAME

* Cleanup unused strings

* Cleanup unused strings

* Add IOT class

* Apply suggestions from code review

* Clean up

* Fix dict comprehension

* Clean sensor

* Use the server ID as a config entry unique ID

* Remove the AlreadyConfigured exception

* Clean up old error string

* Format json

* Convert sensor attributes to snake case

* Force CI

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-08 19:12:14 +02:00
Maciej Bieniek
0587f834df
Add Nettigo Air Monitor integration (#49099) 2021-05-07 08:59:29 -05:00
J. Nick Koston
af832e5434
Use shared httpx client in gogogate2 (#45575) 2021-05-05 21:47:44 -07:00
Aidan Timson
e4ef06d6b1
System Bridge Integration (#48156)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-06 01:33:32 +02:00
Rob Bierbooms
c063f14c24
Add configuration flow for Buienradar integration (#37796)
* Add configuration flow for Buienradar integration

* Update buienradar camera tests to work with config flow

* Update buienradar weather tests to work with config flow

* Update buienradar sensor tests to work with config flow

* Remove buienradar config_flow tests to pass tests

* Add config flow tests for buienradar integration

* Increase test coverage for buienradar config_flow tests

* Move data into domain

* Remove forecast option

* Move data to options

* Remove options from config flow

* Adjust tests

* Adjust string

* Fix pylint issues

* Rework review comments

* Handle import

* Change config flow to setup camera or weather

* Fix tests

* Remove translated file

* Fix pylint

* Fix flake8

* Fix unload

* Minor name changes

* Update homeassistant/components/buienradar/config_flow.py

Co-authored-by: Ties de Kock <ties@tiesdekock.nl>

* Remove asynctest

* Add translation

* Disable sensors by default

* Remove integration name from translations

* Remove import method

* Drop  selection between platforms, disable camera by default

* Minor fix in configured_instances

* Bugfix in weather

* Rework import

* Change unique ids of camera

* Fix in import

* Fix camera tests

* Fix sensor test

* Fix sensor test 2

* Fix config flow tests

* Add option flow

* Add tests for option flow

* Add import tests

* Some cleanups

* Apply suggestions from code review

Apply code suggestions

Co-authored-by: Franck Nijhof <git@frenck.dev>

* Fix isort,black,mypy

* Small tweaks and added typing to new parts

* Fix review comments (1)

* Apply suggestions from code review

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

* Fix review comments (2)

* Fix issues

* Fix unique id

* Improve tests

* Extend tests

* Fix issue with unload

* Address review comments

* Add warning when loading platform

* Add load/unload test

Co-authored-by: Ties de Kock <ties@tiesdekock.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-04 13:49:16 +02:00
Artem Draft
e597202b24
Update LG Netcast to use new backend library (#49927)
* Update LG Netcast to use new backend library

Bump lgnetcast to 0.3.3

* Add codeowner in LG Netcast
2021-05-01 07:49:17 -04:00
jjlawren
db886ef03a
Add additional Sonos codeowner (#49879) 2021-04-29 13:50:16 -07:00
Angelo Gagliano
7c28262bee
Add codeowners for DHT (#49855) 2021-04-29 16:11:56 +02:00
Tom Toor
a57761103c
Mutesync integration (#49679)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-27 13:44:59 -07:00
Michael
a5e25e519f
Remove yaml configuration from fritzbox (#49663) 2021-04-25 09:49:08 -10:00
Simone Chemelli
b92f29997e
Rework Fritz config_flow and device_tracker (#48287)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-04-25 00:10:33 -10:00
Dermot Duffy
bbe58091a8
Create a motionEye integration (#48239) 2021-04-23 23:00:28 -07:00
corneyl
303ab36c54
Add Picnic integration (#47507)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: @tkdrob <tkdrob4390@yahoo.com>
2021-04-21 22:21:56 -07:00
René Klomp
926c2489f0
Implement SMA config flow (#48003)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Johann Kellerman <kellerza@gmail.com>
2021-04-13 06:21:01 -10:00
muppet3000
0ca3186caf
Add 'mix' system support for Growatt integration (#49026)
* Added 'mix' system support for Growatt integration

* Changed Growatt "Last Data Update" to a timestamp

* Changed Growatt "Last Data Update" to UTC

* Accepted suggested change for Growatt  "Last Data Update"

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-13 15:40:30 +02:00
Corbeno
eac1041277
Create DataUpdateCoordinator for each proxmoxve vm/container (#45171)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-04-11 17:14:11 -10:00
Phil Bruckner
f538ea1827
Release ownership of amcrest integration (#49086)
I no longer use this integration and others have taken over maintenance.
2021-04-11 21:44:22 -05:00
Ludovico de Nittis
30618aae94
Reintroduce iAlarm integration (#43525)
The previous iAlarm integration has been removed because it used
webscraping #43010.

Since then, the pyialarm library has been updated to use the iAlarm API
instead.

With this commit I reintroduce the iAlarm integration, leveraging the
new HA config flow.

Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
2021-04-11 10:35:04 -10: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
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
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
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
Petro31
545fe7a7be
Add Compensation Integration (#41675)
* Add Compensation Integration

Adds the Compensation Integration

* Add Requirements

add missing requirements to compensation integration

* Fix for tests

Fix files after tests

* Fix isort

ran isort

* Handle ADR-0007

Change the configuration to deal with ADR-0007

* fix flake8

Fix flake8

* Added Error Trapping

Catch errors.
Raise Rank Warnings but continue.
Fixed bad imports

* fix flake8 & pylint

* fix isort.... again

* fix tests & comments

fix tests and comments

* fix flake8

* remove discovery message

* Fixed Review changes

* Fixed review requests.
* Added test to test get more coverage.

* Roll back numpy requirement

Roll back numpy requirement to match other integrations.

* Fix flake8

* Fix requested changes

Removed some necessary comments.
Changed a test case to be more readable.

* Fix doc strings and continue

* Fixed a few test case doc strings
* Removed a continue/else

* Remove periods from logger

Removed periods from _LOGGER errors.

* Fixes

changed name to unqiue_id.
implemented suggested changes.

* Add name and fix unique_id

* removed conf name and auto construct it
2021-04-03 22:42:09 +02:00
Franck Nijhof
d4d8f74858
Deprecate SolarEdge YAML configuration (#48533) 2021-03-31 10:31:12 +02:00
Joakim Sørensen
f98ce2dd71
Add myself as codeowner to analytics (#48498) 2021-03-30 11:40:11 +02:00
Joakim Sørensen
09c51da3a2
Add analytics integration (#48256)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-29 17:20:11 -07:00
SukramJ
cc38db6a89
Remove myself as codeowner of HomematicIP Cloud (#48437) 2021-03-28 19:18:59 -04:00
chemaaa
1b60c8efb8
Add Homepluscontrol integration (#46783)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-25 14:12:31 +01:00
Erik Montnemery
a49989241a
Refactor tracing: Move trace support to its own integration (#48224) 2021-03-22 19:19:38 +01:00
Greg Dowling
b03c97cdd0
Make Vera should_poll static rather than dynamic (#47854)
* Make should_poll static.

* Address review comments.

* Fix black error.
2021-03-19 20:27:56 +01:00
Kevin Worrel
d21d9951ba
Add Pentair ScreenLogic integration (#47933)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-03-16 13:32:02 -10:00
Nathan Tilley
93c38551d3
Implement Wake On Lan Dummy State (#47719)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-15 17:20:47 +01:00
ollo69
32476a3fed
Fix AsusWRT wrong api call (#47522) 2021-03-08 10:34:12 -08:00
J. Nick Koston
65776ef980
Remove self as code owner for mylink (#46242)
Sadly these devices turn out to be so unreliable that I
gave up on them and replaced them with bond (bondhome.io)
devices which have been rock solid
2021-03-08 07:40:39 -10:00
Alex
a066f84828
Remove @newAM from hdmi_cec codeowners (#47542) 2021-03-07 12:49:13 -05:00
uvjustin
864380e77c
Add allenporter to stream codeowners (#47431) 2021-03-05 15:51:07 +01:00
J. Nick Koston
2de01ddaeb
Remove griddy integration (#47218) 2021-03-01 10:35:23 +01:00
Nathan Tilley
8d2606134d
Add FAA Delays Integration (#41347)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-24 14:11:20 -06:00
MeIchthys
1a73cb4791
Mullvad VPN (#44189)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-02-24 12:04:38 +01:00
Raman Gupta
eccdae60bf
Add ClimaCell weather integration (#36547)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-24 09:34:27 +01:00
Jon Caruana
6a8b5ee51b
LiteJet is now configured using config_flow (#44409)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-02-23 14:20:58 -06:00
Nathan Spencer
e70d896e1b
Add litterrobot integration (#45886) 2021-02-22 08:53:57 -10:00
Diogo Gomes
5c29adea3d
Add KMTronic Integration (#41682)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-02-21 20:12:50 -10:00
Garrett
3ad207a499
Add new Subaru integration (#35760)
Co-authored-by: On Freund <onfreund@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-02-20 16:52:44 -10:00
Milan Meulemans
4af619d383
Add Rituals Perfume Genie integration (#46218)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-02-20 11:55:23 -10:00
Eric Severance
76e5f86b76
Add @esev as codeowner for wemo (#46756) 2021-02-18 19:08:48 +01:00
Álvaro Fernández Rojas
4083b90138
ubus: switch to pypi library (#46690)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-02-18 12:33:21 +01:00
Ilja Leiko
8c72cb6163
Add sensors to fetch Habitica tasks (#38910)
* Adding sensors to fetch habitica tasks

* PR changes and rebase

* Fixing pylint

* Fixing failed test dependancy

* Generating requirements

* Apply suggestions from code review

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

* PR changes

* Update homeassistant/components/habitica/config_flow.py

Thank you, @MartinHjelmare

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

* PR Changes

* Fix failing test

* Update tests/components/habitica/test_config_flow.py

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

* Fixing linting and imports

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-17 09:04:11 +01:00
Matt Zimmerman
58499946ed
Add SmartTub integration (#37775)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-02-16 19:37:56 -10:00
David McClosky
713544e5eb
Bump python-vlc-telnet to 2.0.1 (#46608)
Includes corresponding Home Assistant changes to avoid introducing
regressions.
2021-02-16 12:32:53 +01:00
Erik Montnemery
5a907ebafc
Remove @home-assistant/core from MQTT codeowners (#46562) 2021-02-15 11:51:56 +01:00
javicalle
9777608861
Add myself to RFLink codeowners (#46511) 2021-02-14 16:24:00 +01:00
Álvaro Fernández Rojas
eecf07d7df
Add AEMET OpenData integration (#45074)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-13 21:53:28 +01:00
Shay Levy
6f261a09b0
Remove deprecated xfinity integration (#46484) 2021-02-13 14:07:55 +01:00
Álvaro Fernández Rojas
1b194e3b2f
Add noltari to Tado code owners (#46216) 2021-02-08 11:08:13 -05:00
Bram Kragten
6f446cf627
Add my component (#46058)
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-08 14:44:46 +01:00
functionpointer
c01e01f797
MySensors config flow (#45421)
* MySensors: Add type annotations

Adds a bunch of type annotations that were created
while understanding the code.

* MySensors: Change GatewayId to string

In preparation for config flow.
The GatewayId used to be id(gateway).

With config flows, every gateway will have its own
ConfigEntry. Every ConfigEntry has a unique id.
Thus we would have two separate but one-to-one related ID systems.

This commit removes this unneeded duplication by using the id of the ConfigEntry
as GatewayId.

* MySensors: Add unique_id to all entities

This allows entities to work well with the frontend.

* MySensors: Add device_info to all entities

Entities belonging to the same node_id will now by grouped as a device.

* MySensors: clean up device.py a bit

* MySensors: Add config flow support

With this change the MySensors can be fully configured from the GUI.

Legacy configuration.yaml configs will be migrated by reading them once.
Note that custom node names are not migrated. Users will have to re-enter
the names in the front-end.
Since there is no straight-forward way to configure global settings,
all previously global settings are now per-gateway. These settings include:
- MQTT retain
- optimistic
- persistence enable
- MySensors version

When a MySensors integration is loaded, it works as follows:
1. __init__.async_setup_entry is called
2. for every platform, async_forward_entry_setup is called
3. the platform's async_setup_entry is called
4. __init__.setup_mysensors_platform is called
5. the entity's constructor (e.g. MySensorsCover) is called
6. the created entity is stored in a dict in the hass object

* MySensors: Fix linter errors

* MySensors: Remove unused import

* MySensors: Feedback from @MartinHjelmare

* MySensors: Multi-step config flow

* MySensors: More feedback

* MySensors: Move all storage in hass object under DOMAIN

The integration now stores everything under hass.data["mysensors"]
instead of using several top level keys.

* MySensors: await shutdown of gateway instead of creating a task

* MySensors: Rename Ethernet to TCP

* MySensors: Absolute imports and cosmetic changes

* MySensors: fix gw_stop

* MySensors: Allow user to specify persistence file

* MySensors: Nicer log message

* MySensors: Add lots of unit tests

* MySensors: Fix legacy import of persistence file name

Turns out tests help to find bugs :D

* MySensors: Improve test coverage

* MySensors: Use json persistence files by default

* MySensors: Code style improvements

* MySensors: Stop adding attributes to existing objects

This commit removes the extra attributes that were being
added to the gateway objects from pymysensors.

Most attributes were easy to remove, except for the gateway id.
The MySensorsDevice class needs the gateway id as it is part of its DevId
as well as the unique_id and device_info.
Most MySensorsDevices actually end up being Entities.
Entities have access to their ConfigEntry via self.platform.config_entry.

However, the device_tracker platform does not become an Entity.
For this reason, the gateway id is not fetched from self.plaform but
given as an argument.

Additionally, MySensorsDevices expose the address of the gateway
(CONF_DEVICE). Entities can easily fetch this information via self.platform,
but the device_tracker cannot. This commit chooses to remove the gateway
address from device_tracker. While this could in theory break some automations,
the simplicity of this solution was deemed worth it.
The alternative of adding the entire ConfigEntry as an argument to MySensorsDevices
is not viable, because device_tracker is initialized by the async_setup_scanner function
that isn't supplied a ConfigEntry. It only gets discovery_info.
Adding the entire ConfigEntry doesn't seem appropriate for this edge case.

* MySensors: Fix gw_stop and the translations

* MySensors: Fix incorrect function calls

* MySensors: Fewer comments in const.py

* MySensors: Remove union from _get_gateway and remove id from try_connect

* MySensors: Deprecate nodes option in configuration.yaml

* MySensors: Use version parser from packaging

* MySensors: Remove prefix from unique_id and change some private property names

* MySensors: Change _get_gateway function signature

* MySensors: add packaging==20.8 for the version parser

* MySensors: Rename some stuff

* MySensors: use pytest.mark.parametrize

* MySensors: Clean up test cases

* MySensors: Remove unneeded parameter from devices

* Revert "MySensors: add packaging==20.8 for the version parser"

This reverts commit 6b200ee01a.

* MySensors: Use core interface for testing configuration.yaml import

* MySensors: Fix test_init

* MySensors: Rename a few variables

* MySensors: cosmetic changes

* MySensors: Update strings.json

* MySensors: Still more feedback from @MartinHjelmare

* MySensors: Remove unused strings

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

* MySensors: Fix typo and remove another unused string

* MySensors: More strings.json

* MySensors: Fix gateway ready handler

* MySensors: Add duplicate detection to config flows

* MySensors: Deal with non-existing topics and ports.

Includes unit tests for these cases.

* MySensors: Use awesomeversion instead of packaging

* Add string already_configured

* MySensors: Abort config flow when config is found to be invalid while importing

* MySensors: Copy all error messages to also be abort messages

All error strings may now also be used as an abort reason,
so the strings should be defined

* Use string references

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-05 22:13:57 +01:00
Niccolo Zapponi
a775b79d4b
Add support for iCloud 2FA (#45818)
* Add support for iCloud 2FA

* Updated dependency for iCloud

* Updated dependency and logic fix

* Added logic for handling incorrect 2FA code

* Bug fix on failing test

* Added myself to codeowners

* Added check for 2FA on setup

* Updated error message
2021-02-03 19:18:31 +01:00
Brandon Rothweiler
4b208746e5
Add Mazda Connected Services integration (#45768) 2021-02-03 17:38:12 +01:00
Quentame
d9dba1b7ab
Bump Freebox to 0.0.9 (#45837)
* Bump Freebox to 0.0.9

* Remove @SNoof85 from code owners

* Module is now freebox_api
2021-02-02 22:57:06 +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