1
mirror of https://github.com/home-assistant/core synced 2024-09-28 03:04:04 +02:00
Commit Graph

549 Commits

Author SHA1 Message Date
G Johansson
472ffd3bc6
Implement config flow for SQL integration (#68700) 2022-04-24 08:50:32 -10:00
Milan Meulemans
c932407560
Add SENZ OAuth2 integration (#61233) 2022-04-14 15:29:31 -07:00
Billy Stevenson
2c3d9566cb
Add Meater integration (#44929)
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
Co-authored-by: Brian Rogers <brg468@hotmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Erik <erik@montnemery.com>
2022-04-01 15:11:37 +02:00
Antoni Czaplicki
76f07ec240
Add Uonet+ Vulcan integration (#56357)
* Add Uonet+ Vulcan integration

* Add "configuration_url", fix some minor issues

* Refactor and fix tests

* Optimize code

* Apply suggestion from code review

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>

* Update error handling

* Fix some tests

* Update CODEOWNERS and fix pylint

* Cleanup vulcan tests

* Run prettier

Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-03-30 17:55:24 +02:00
Robert Hillis
9f0665bbb4
Add config flow to discord (#61069) 2022-03-30 13:18:48 +02:00
Michael
2f7aeb64d2
Add config flow to Tankerkoenig (#68386) 2022-03-29 20:23:30 -07:00
G Johansson
06435f633f
Implement config flow for trafikverket_train (#65182) 2022-03-29 08:32:38 -10:00
Erik Montnemery
bdb61e0222
Add config flow for utility_meter (#68457) 2022-03-29 14:46:17 +02:00
Dave T
c1a2be72fc
Generic IP Camera configflow 2 (#52360)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-03-28 09:08:00 -10:00
Erik Montnemery
2ec1e06c75
Mark group as a helper integration (#68775) 2022-03-28 12:36:11 +02:00
Erik Montnemery
a597c11ea2
Mark threshold as a helper integration (#68780) 2022-03-28 12:26:52 +02:00
Erik Montnemery
48187cebad
Mark integration as a helper integration (#68778) 2022-03-28 10:35:52 +02:00
Erik Montnemery
95d6848726
Mark switch_as_x as a helper integration (#68779) 2022-03-28 10:35:08 +02:00
Erik Montnemery
66d892237d
Add config flow for min_max sensor (#67807)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-03-28 09:39:54 +02:00
rappenze
e844c2380a
Add config flow to fibaro (#65203)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-03-26 09:50:50 -10:00
G Johansson
67cf053260
Implement config flow for filesize (#67668)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-03-25 09:30:28 -10:00
Erik Montnemery
9f079a22d5
Add config flow for times of the day binary sensor (#68246)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-03-24 20:46:34 +01:00
Robert Hillis
e1ae940a34
Add config flow to deluge (#58789) 2022-03-22 21:01:24 -07:00
Erik Montnemery
b5d2c6e43a
Add config flow for threshold binary sensor (#68238)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-03-22 11:32:19 +01:00
IceBotYT
a43505a0a3
Add PECO power outage counter integration (#65194)
* Create a new NWS Alerts integration

* Create a new NWS Alerts integration

* Create new PECO integration

* Remove empty keys

* Revert "Create a new NWS Alerts integration"

This reverts commit 38309c5a87.

* Revert "Create a new NWS Alerts integration"

This reverts commit aeabdd37b8.

* Fix test with new mock data

* Add init and sensor to .coveragerc and more tests for config flow

* Small fixes and replacing patch with pytest.raises in testing invalid county

* Add type defs and fix test_config_flow to use MultipleValid instead

* Fix  issues with 'typing.Dict'

* Move API communication to seperate PyPI library

* Switch PyPI library from httpx to aiohttp to allow for passing in websessions

* Commit file changes requested by farmio as listed here: d267e4300a

* Add suggestions requested by farmio as listed here: 586d8ffa42

* Move native_unit_of_measurement from prop to attr

* Update PLATFORMS constant type annotation

Co-authored-by: Matthias Alphart <farmio@alphart.net>

* Add peco to .strict-typing

I am from school so I can't run mypy atm

* Forgot to import Final

* Do as requested [here](https://github.com/home-assistant/core/runs/5070634928?check_suite_focus=true)

* Updated mypy.ini, checks should pass now

* Fix to conform to mypy restrictions https://github.com/home-assistant/core/runs/5072861837\?check_suite_focus\=true

* Fix type annotations

* Fix tests

* Use cast in async_update_data

* Add data type to CoordinatorEntity and DataUpdateCoordinator

* More cleanup from suggestions here: https://github.com/home-assistant/core/pull/65194\#pullrequestreview-908183493

* Fix tests for new code

* Cleaning up a speck of dust

* Remove unused variable from the peco sensor

* Add rounding to percentage, and extra clean-up

* Final suggestions from @farmio

* Update SCAN_INTERVAL to be a little bit faster

* Change the SCAN_INTERVAL to be somewhat near the update interval of the outage map, as noted by farmio

* New UpdateCoordinator typing
2022-03-21 23:56:53 +01:00
Paulus Schoutsen
3213091b8d
Add integration type (#68349) 2022-03-20 20:38:13 -07:00
Baptiste Candellier
a136cf7086
Remove SmartHab integration (#67874) 2022-03-20 19:00:16 +01:00
Raman Gupta
4cd4fbefbf
Add new tomorrow.io integration to replace Climacell (#68156)
* Add new tomorrow.io integration to replace Climacell - Part 1/3 (#57121)

* Add new tomorrow.io integration to replace Climacell - Part 1/3

* remove unused code

* remove extra test

* remove more unused code

* Remove even more unused code

* Feedback

* clean up options flow

* clean up options flow

* tweaks and fix tests

* remove device_class from tomorrowio entity description class

* use timestep

* fix tests

* always use default name but add zone name if location is in a zone

* revert change that will go into future PR

* review comments

* move code out of try block

* bump max requests to 500 as per docs

* fix tests

* Add new tomorrow.io integration to replace Climacell - Part 2/3 (#57124)

* Add new tomorrow.io integration to replace Climacell - Part 2/3

* translations

* set config flow to false in manifest

* Cleanup more code and re-add options flow test

* fixes

* patch I/O calls

* Update tests/components/climacell/test_config_flow.py

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

* remove unused import

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

* Fix codeowners

* fix mypy and pylint

* Switch to DeviceInfo

* Fix fixture location and improve sensor entities in tomorrowio integration (#63527)

* Add new tomorrow.io integration to replace Climacell - Part 3/3 (#59698)

* Switch to DeviceInfo

* Add new tomorrow.io integration to replace Climacell - Part 1/3 (#57121)

* Add new tomorrow.io integration to replace Climacell - Part 1/3

* remove unused code

* remove extra test

* remove more unused code

* Remove even more unused code

* Feedback

* clean up options flow

* clean up options flow

* tweaks and fix tests

* remove device_class from tomorrowio entity description class

* use timestep

* fix tests

* always use default name but add zone name if location is in a zone

* revert change that will go into future PR

* review comments

* move code out of try block

* bump max requests to 500 as per docs

* fix tests

* Migrate ClimaCell entries to Tomorrow.io

* tweaks

* pylint

* Apply fix from #60454 to tomorrowio integration

* lint and mypy

* use speed conversion instead of distance conversion

* Use SensorDeviceClass enum

* Use built in conversions and remove unused loggers

* fix requirements

* Update homeassistant/components/tomorrowio/__init__.py

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

* Use constants

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

* Black

* Update logic and add coverage

* remove extra line

* Do patching correctly

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-03-19 08:42:22 +01:00
Franck Nijhof
2686be921c
Remove deprecated (old) Z-Wave integration (#67221)
* Remove deprecated (old) Z-Wave integration

* Mark migration tests as skip, for later cleanup
2022-03-18 13:09:10 +01:00
Erik Montnemery
5bb271c9fb
Add config flow for derivative sensor (#68268) 2022-03-18 12:14:38 +01:00
Erik Montnemery
2fcced333d
Add config flow for sun (#68295)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-03-18 10:12:15 +01:00
Erik Montnemery
0655ebbd84
Add config flow for integration sensor (#68288) 2022-03-18 09:52:17 +01:00
Allen Porter
7876ffe9e3
Update google calendar integration with a config flow (#68010)
* Convert google calendar to config flow and async

* Call correct exchange method

* Fix async method and reduce unnecessary diffs

* Wording improvements

* Reduce unnecessary diffs

* Run load/update config from executor

* Update homeassistant/components/google/calendar.py

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

* Remove unnecessary updating of unexpected multiple config entries.

* Remove unnecessary unique_id checks

* Improve readability with comments about device code expiration

* Update homeassistant/components/google/calendar.py

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

* Update homeassistant/components/google/calendar.py

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

* Update homeassistant/components/google/api.py

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

* Add comment for when code is none on timeout

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-03-15 07:51:02 +01:00
Franck Nijhof
57c33a5cf0
Remove deprecated OpenZWave integration (#68054) 2022-03-14 17:33:04 +01:00
Franck Nijhof
0467dc55fe
Add config flow to Uptime (#67408) 2022-03-12 12:36:08 +01:00
Erik Montnemery
cb7e492e81
Add switch_as_x integration (#67878)
* Add switch_as_x integration

* Address review comments

* Add translation strings

* Rename entity_type option to target_domain

* Move LightSwitch class definition to switch_as_x/light.py

* Update manifest

* Move tests
2022-03-10 12:23:01 +01:00
Álvaro Fernández Rojas
8549e31b27
Add Airzone HVAC Zoning Systems (#67666) 2022-03-08 22:28:39 +01:00
Steve Easley
ea82f2e293
Add Kaleidescape integration (#67711) 2022-03-08 00:16:43 +01:00
Franck Nijhof
9d42a425fc
Add config flow to Season (#67413) 2022-03-07 18:58:29 +01:00
Erik Montnemery
a9cc2d2322
Add config flow for cover, fan, light and media_player groups (#67660)
* Add options flow support to HelperConfigFlowHandler

* Add config flow for cover, fan, light and media_player groups

* Update according to review comments

* Update translation strings

* Update translation strings

* Copy schema before adding suggested values
2022-03-07 13:05:04 +01:00
Erik Montnemery
0c12914548
Add config flow for switch.light (#67447)
* Add config flow for switch.light

* Refactor according to code review

* Setup light switch from config entry

* Improve async_resolve_entity

* Prepare for multiple steps

* Remove name and options flow from switch light

* Check type before adding description to schema keys

* Remove options flow enabler

* Copy name from the switch

* Move helper flows to new file

* Improve test coverage

* Fix name

* Remove dead code from abstract method

* Remove manifest 'helper' option

* Validate registry entry id before forwarding to light platform

* Improve test

* Add translations

* Improve config entry setup

* Log when config entry fails setup

* Update homeassistant/components/switch/__init__.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-03-04 20:02:17 +01:00
Franck Nijhof
02391663c1
Add config flow to Moon (#67444) 2022-03-03 15:12:33 -08:00
Michael Chisholm
b19bf9b147
Add dlna_dms integration to support DLNA Digital Media Servers (#66437) 2022-02-21 15:14:08 -08:00
Franck Nijhof
d839febbe7
Add Radio Browser integration (#66950) 2022-02-21 09:13:02 -08:00
Klaas Schoute
6c2d6fde66
Add Pure Energie integration (#66846) 2022-02-19 17:53:25 +01:00
Franck Nijhof
e26488b1ca
Add config flow to MJPEG IP Camera (#66607) 2022-02-18 00:03:41 -08:00
Mike Fugate
0bd0b4766e
Refactor sleepiq as async with config flow (#64850)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-02-16 08:51:29 -06:00
j-a-n
243d003acc
Add Moehlenhoff Alpha2 underfloor heating system integration (#42771)
* Add Moehlenhoff Alpha2 underfloor heating system integration

* isort changes

* flake8 changes

* Do not exclude config_flow.py

* pylint changes

* Add config_flow test

* correct requirements_test_all.txt

* more tests

* Update test description

* Test connection and catch TimeoutError in async_setup_entry

* Add version to manifest file

* Remove version from manifest file

* Replace tests.async_mock.patch by unittest.mock.patch

* Update moehlenhoff-alpha2 to version 1.0.1

* Update requirements for moehlenhoff-alpha2 1.0.1

* Update moehlenhoff-alpha2 to 1.0.2

* Use async_setup_platforms

* Use async_unload_platforms

* Separate connection and devices for each entry_id

* Use async_track_time_interval to schedule updates

* Check if input is valid before checking uniqueness

* Move Exception handling to validate_input

* Catch aiohttp.client_exceptions.ClientConnectorError

* Remove translation files

* Mock TimeoutError

* Fix data update

* Replace current callback implementation with ha dispatcher

* Return False in should_poll

* Remove unused argument

* Remove CONNECTION_CLASS

* Use _async_current_entries

* Call async_schedule_update_ha_state after data update

* Remove unneeded async_setup

Co-authored-by: Milan Meulemans <milan.meulemans@live.be>

* Remove unneeded async_setup_platform

Co-authored-by: Milan Meulemans <milan.meulemans@live.be>

* Set Schema attribute host required

Co-authored-by: Milan Meulemans <milan.meulemans@live.be>

* Remove unused Exception class

Co-authored-by: Milan Meulemans <milan.meulemans@live.be>

* Update manifest.json

Co-authored-by: Milan Meulemans <milan.meulemans@live.be>

* pylint constructor return type None

* Replace properties by class variables

* use pass instead of return

* Remove unused sync update method

* remove property hvac_action

* remove pass

* rework exception handling

* Update homeassistant/components/moehlenhoff_alpha2/config_flow.py

Co-authored-by: Milan Meulemans <milan.meulemans@live.be>

* Correct indentation

* catch Exception in validate_input

* Replace HomeAssistantType with HomeAssistant

* Update to moehlenhoff-alpha2 1.0.3

* Allow to switch between heating and cooling mode

* Update moehlenhoff-alpha2 to version 1.0.4

* Update heatarea data after setting target temperature

* Support hvac_action

* Fix heatarea update with multiple bases

* Update data after setting preset mode

* Use custom preset modes like defined by device

* Fix config flow test

* Fix test_duplicate_error

* Rename property to extra_state_attributes

Rename property device_state_attributes to extra_state_attributes and
return lowercase keys in dict.

* Refactor using DataUpdateCoordinator

* Remove _attr_should_poll

* Raise HomeAssistantError on communication error

Catch HTTPError instead of broad except and reraise as HomeAssistantError

* Change DataUpdateCoordinator name to alpha2_base

* Refresh coordinator before setting data

* Raise ValueError on invalid heat area mode

* Rename heatarea to heat_area

* Set type annotation in class attribute

* Move coordinator to top

* Move exception handling to the coordinator

* Use heat_area_id directly

* Sore get_cooling() result into local var

* Add explanation of status attributes

and remove BLOCK_HC

* Fix pylint warnings

* from __future__ import annotations

* Use Platform Enum

* Move data handling to coordinator

* Remove property extra_state_attributes

* Add missing annotations

* Update moehlenhoff-alpha2 to version 1.1.2

* Rework tests based on the scaffold template

* Set also heat/cool/day/night temp with target temp

* Remove unneeded code from tests

Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
2022-02-10 08:28:52 +01:00
Sander Jochems
0ea82bdbfb
Fivem integration (#65089)
* Initial fivem integration setup

* Use licenseKey for unique ID

* Create FiveMServer class

* Create FiveMStatusBinarySensor

* Fix platform loading

* Create sensor platform

* Remove config flow tests

* Update manifest.json

* Use attr_ instead or properties in sensors.py

* Use entry_id as unique_id

* Move device info to _attr instead of property

* Register callback in FiveMEntity

* Create config flow tests

* Add loggin to fivem

* Use FiveM in config_flow

* Use update_coordinator instead of dispatcher

* Bump fivem-api to 0.1.2

* Remove leftovers

* More tests for config flow

* Add component files to .coveragerc

* Fix simple comments

* Add gamename check to config flow

* Use entity descriptions for sensors

* Move extra attributes to init

* Use [] instead of get() for server info

* Fix error in gamename test
2022-02-08 11:27:11 +02:00
Poltorak Serguei
3c5a667d97
Add Z-Wave.Me integration (#65473)
* Add support of Z-Wave.Me Z-Way and RaZberry server (#61182)

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: LawfulChaos <kerbalspacema@gmail.com>

* Add switch platform to Z-Wave.Me integration (#64957)

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

* Add button platform to Z-Wave.Me integration (#65109)

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Dmitry Vlasov <kerbalspacema@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Fix button controller access (#65117)

* Add lock platform to Z-Wave.Me integration #65109 (#65114)

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Dmitry Vlasov <kerbalspacema@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Add sensor platform to Z-Wave.Me integration (#65132)

* Sensor Entity

* Sensor fixes

* Apply suggestions from code review

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

* Inline descriotion according to review proposal

* State Classes for sensor

* Generic sensor

* Generic sensor

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

* Add binary sensor platform to Z-Wave.Me integration (#65306)

* Binary Sensor Entity

* Update docstring

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

* Add Light Entity platform to Z-Wave.Me integration (#65331)

* Light Entity

* mypy fix

* Fixes, ZWaveMePlatforms enum

* Apply suggestions from code review

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

* Fixes

* Fixes

* Fixes

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

* Add Thermostat platform to Z-Wave.Me integration #65331 (#65371)

* Climate entity

* Climate entity

* Apply suggestions from code review

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

* Climate entity fix

* Clean up

* cleanup

* Import order fix

* Correct naming

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

* Correct zwave_me .coveragerc (#65491)

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

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: LawfulChaos <kerbalspacema@gmail.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-02-07 16:27:11 +01:00
Stephan Traub
432d9a8f19
Introduce wiz integration for the WiZ Platform (#44779)
Co-authored-by: Marvin Wichmann <marvin@fam-wichmann.de>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Jan Stienstra <65826735+j-stienstra@users.noreply.github.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-02-04 16:20:21 -08:00
Simon Hansen
049fc8a945
Add config flow to ISS integration (#64987)
* Initial commit

* Wrong flowhandler name

* Add config flow tests

* Tests for config flow

* ...

* Add test for no coordinates

* ...

* Update homeassistant/components/iss/config_flow.py

Co-authored-by: Shay Levy <levyshay1@gmail.com>

* Update homeassistant/components/iss/config_flow.py

* Update homeassistant/components/iss/binary_sensor.py

Co-authored-by: Shay Levy <levyshay1@gmail.com>

* Add myself as codeowner

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-01-29 11:41:26 +02:00
tokenize47
2f30fdb9b8
Add solax config flow (#56620) 2022-01-26 10:58:06 +01:00
Nick Whyte
3dd7ec6856
Add Aussie Broadband integration (#53552) 2022-01-20 19:34:25 -10:00
G Johansson
543064d7b7
Implement config flow dnsip (#62843) 2022-01-20 10:45:58 -10:00
Jeef
f854fdb8fd
Add Intellifire Gas Fireplace integration (#63637)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Mick Vleeshouwer <mick@imick.nl>
2022-01-20 10:01:04 +01:00
Joakim Sørensen
6a0c3843e5
Revamp github integration (#64190)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-01-18 20:04:01 +01:00
Shay Levy
dee843bf6e
Add LG webOS Smart TV config flow support (#64117)
* Add webOS Smart TV config flow support (#53256)

* Add Webostv config flow

* Fix tests mocks and apply review comments

* Apply review comments

* Change config flow to use ssdp UDN as unique_id

* Fix device info

* More review comments

* Fix _async_check_configured_entry

* Remove turn on script

* Add webOS Smart TV device triggers (#53752)

* Add webOS Smart TV config flow support (#53256)

* Add Webostv config flow

* Fix tests mocks and apply review comments

* Apply review comments

* Change config flow to use ssdp UDN as unique_id

* Fix device info

* More review comments

* Fix _async_check_configured_entry

* Remove turn on script

* Add webOS Smart TV device triggers (#53752)

* Fix webOS Smart TV mypy and pylint errors (#62620)

* Change webOS Smart TV PyPi aiopylgtv package to bscpylgtv (#62633)

* Change webOS Smart TV PyPi aiopylgtv package to bscpylgtv

* Update bscpylgtv to 0.2.8 (revised websockets requirment)

* Change webOS Smart TV PyPi package to aiowebostv (#63759)

* Change webOS Smart TV PyPi package to aiowebostv

* Apply suggestions from code review

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

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

* webOS TV check UUID for user added device (#63817)

* webOS TV check uuid when for user added device

* Apply suggestions from code review

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

* Add test for form abort and host update

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

* Rework webOS Smart TV device trigger to custom trigger platform (#63950)

* Rework webOS Smart TV device trigger to custom trigger platform

* Review comments and add tests

* Fix webOS TV import from YAML (#63996)

* Fix webOS TV import from YAML

* Fix requirements

* Migrate YAML entities unique id to UUID

* Add backoff to migration task delay

* Assert result data and unique_id

* Apply suggestions from code review

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

* Add codeowner

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-01-14 22:48:45 +01:00
Duco Sebel
8f6e24aa1e
Add HomeWizard Energy integration (#55812)
Co-authored-by: Matthias Alphart <farmio@alphart.net>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-01-10 16:23:31 -08:00
Simon Hansen
b22a9b8669
Refactor Launch Library to use config flow (#62416)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
2022-01-08 11:47:16 +01:00
J. Nick Koston
943aaaeb3f
Add SenseME integration (#62909)
Co-authored-by: Big Mike <mikelawrence@users.noreply.github.com>
2022-01-07 22:53:05 -10:00
J. Nick Koston
4283b2358c
Add support for Steamist steam showers (#63251)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-01-06 02:55:57 +01:00
mletenay
f0acbabd48
Add Goodwe solar inverter integration (#58503)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: starkillerOG <starkiller.og@gmail.com>
2022-01-04 22:19:31 +01:00
J. Nick Koston
724f5dbf1a
Add Oncue by Kohler integration (#63203) 2022-01-02 09:15:39 -10:00
Allen Porter
c7b991f56b
Add rtsptowebrtc integration (#59660)
* Add initial version of the webrtc integration

Add the webrtc integration. This integration proxies the
signal 'offer' from the client to a RTSPtoWebRTCP server that
returns an 'answer'.

The RTSPtoWebRTC server is a go binary based on pion, and this is
what is currently used by the WebRTC custom_component:
https://github.com/AlexxIT/WebRTC
https://github.com/deepch/RTSPtoWebRTC

* Readability improvements for webrtc

* Reach 100% test coverage

* Use rtsp-to-webrtc client library package

* Rename webrtc to rtstptowebrtc

This is to reflect naming as one type of approach to webrtc since other webrtc integrations would look very different.

* Remove internal quality scale

* Bump rtsptowebrtc to support heartbeats

* Shorten server url variable and remove const.py

* Add config flow validation for RTSPtoWebRTC server

* Add RTSPtoWebRTC server health checks

* Accept translation suggestion

* Apply suggestions from code review

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

* Update rtsptowebrtc to use new camera registry API

Update rtsptowebrtc to use new API added in #62962

* Remove unused variable

* Fix lint and typing errors for python 3.8

* Rename to rtsp_to_webrtc to follow standards

* Use async_on_unload for unsubscribing camera webrtc provider

* Remove unnecessary translations in config flow

* Remove unnecessary configuration setup

* Cleanup test setup and typing

* Patch integration setup to avoid starting the whole integration

Co-authored-by: J. Nick Koston <nick@koston.org>
2022-01-01 12:36:31 -08:00
Franck Nijhof
b5300fb32e
Add configuration flow to Whois (#63069)
Co-authored-by: Dave T <17680170+davet2001@users.noreply.github.com>
2021-12-30 22:42:46 +01:00
Franck Nijhof
5ab527e59c
Add configuration flow to CPU Speed (#62929) 2021-12-28 21:17:53 +01:00
Sebastian Lövdahl
b5fd2e0d58
Convert Vallox integration to config flow (#62780) 2021-12-28 10:06:29 -10:00
Franck Nijhof
1cfeb404b6
Add configuration flow to PVOutput (#62667)
* Add configuration flow to PVOutput

* Update homeassistant/components/pvoutput/sensor.py

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

* Update homeassistant/components/pvoutput/sensor.py

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

* Use account URL placeholder

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-12-27 22:05:10 +01:00
Christopher Bailey
e982e7403a
Add unifiprotect integration (#62697)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-12-25 20:12:57 -10:00
Joakim Sørensen
13e3ca6ab1
Add config flow to version integration (#54642) 2021-12-23 21:04:58 +01:00
Mick Vleeshouwer
3605c4f32f
Add Overkiz integration (with base + sensor entity) (#62640) 2021-12-23 08:34:35 -10:00
G Johansson
566f631933
Implement config_Flow for Sensibo (#60900)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-12-22 10:32:50 -10:00
ollo69
5a41251d45
Add config_flow to AndroidTV integration (#54444)
Co-authored-by: Robert Hillis <tkdrob4390@yahoo.com>
2021-12-20 13:08:35 -06:00
Franck Nijhof
0dbd948867
Add Open-Meteo integration (second attempt) (#61742) 2021-12-16 21:12:33 +01:00
Eduard van Valkenburg
80833aa7fb
Add config flow to Azure Event Hub integration (#61155)
* config flow added, no tests yet

* added tests

* refinement of tests

* small reverses of hub code

* fix small bug

* test fixes from review

* test fixes from review

* further refinement of tests and config flow

* removed true return from hub and added failed reason for import

* added deepcopy to default options

* deleted max_delay from options, can still be in yaml for now

* updated dropped message

* mistaken period at eol
2021-12-16 18:57:51 +01:00
Alberto Geniola
b0affe7bfb
Elmax integration (#59321)
* Add elmax integration.

* Run hassfest and generate requirements_all

* Remove secondary platforms from elmax integration as per first component integration.

* Move ElmaxCoordinator and ElmaxEntity into external file
Linting review

* Remove useless variables

* Fix wrong indentation.

* Remove unecessary platforms.

* Remove unnecessary attributes from manifest.

* Rely on property getters/setters rathern than private attribute from parent.
Update internal entity state just after transitory state update.

* Update homeassistant/components/elmax/const.py

Reference Platform constant

Co-authored-by: Marvin Wichmann <marvin@fam-wichmann.de>

* Update username/password values

Rely on already-present templating constants

Co-authored-by: Marvin Wichmann <marvin@fam-wichmann.de>

* Add missing constant import.

* Remove unnecessary test_unhandled_error() callback implementation.

* Add common.py to coverage ignore list.

* Improve coverage of config_flow.

* Rename the integration.

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

* Fix reauth bug and improve testing.

* Refactor lambdas into generators.

Co-authored-by: Marvin Wichmann <marvin@fam-wichmann.de>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-12-07 22:42:55 +01:00
epenet
97d292133f
Revert "Add Open-Meteo integration (#60379)" (#61130)
This reverts commit d802f3a82f.
2021-12-06 23:35:14 +01:00
Franck Nijhof
d802f3a82f
Add Open-Meteo integration (#60379)
Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>
2021-12-06 10:01:12 -08:00
Milan Meulemans
a7e129a952
Add Aseko Pool Live integration (#56299) 2021-12-05 17:02:46 -10:00
Maximilian
9f7b8d3009
Add nina integration (#56647)
* Added nina integration

* Improvements implemented

* Fixed lint errors

* Added tests

* Improvements implemented

* Use client session from HA

* Added custom coordinator

* Fixed tests

* Fix pylint errors

* Library updated to 0.1.4

* Optimization of static attributes

* Removed unused code

* Switched to BinarySensorDeviceClass

* Switched to Platform Enum

* Improve repetition

* Improve repetition

* Fix corona filter

* Removed intermediate variable

Co-authored-by: Marvin Wichmann <marvin@fam-wichmann.de>

* Fix black formatting

Co-authored-by: Marvin Wichmann <marvin@fam-wichmann.de>
2021-12-05 15:11:02 +01:00
Franck Nijhof
6a8c732b37
Add Tailscale integration (#59764)
* Add Tailscale integration

* Use DeviceEntryType

* Fix tests

* Adjust to new Pylint version

* Use enums for device classes

* Update homeassistant/components/tailscale/config_flow.py

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

* Pass empty string as default

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-12-01 14:40:38 +01:00
G Johansson
11b81ef88b
Config flow for trafikverket_weatherstation (#60078)
* First commit

* Added tests

* Add requirements for test

* Correction requirements tests

* Add init to untested files

* Fix review comments

* Resolve last items from review

* Add sync_abort_entries_match in import flow
2021-11-30 19:53:41 +01:00
einarhauks
4d345e0665
Add Tesla Wall Connector integration (#60000) 2021-11-28 07:41:01 -10:00
Tim Rightnour
03d1efab46
Add Balboa Spa integration (#59234) 2021-11-25 12:04:06 -06:00
Matthias Lohr
a399037a46
Add TOLO Sauna (tolo) integration (#55619) 2021-11-24 20:45:13 +01:00
Matthias Alphart
3dac661480
Rewrite Fronius integration (#59686)
* Add unique_id and use DataUpdateCoordinator in Fronius (#57879)

* initial refactoring commit - meters

- config_flow (no strings, no tests yet)
- import yaml config
- FroniusSolarNet class for holding Fronius object , coordinators and some common data
- meter descriptions
- update coordinator
- entities (including devices)

* storage controllers

* error handling on init; inverter unique_id

* inverters

* power_flow

* fix VA, var, varh not valid for device_class power/energy

and add custom icons

* add SolarNet device for system wide values

* cleanup

* config_flow strings

* test config_flow

* use pyfronius 0.7.0

* enable strict typing

* remove TODO comments

* fix lint errors; move FroniusSensorEntity to sensor.py

* power_flow as optional coordinator

API V0 doesn't support power_flow endpoint

* show error message in logs

* prevent parallel requests to one host

* logger_info coordinator

* store FroniusSolarNet reference directly in coordinator

* cleanup coordinators when unloading entry

* round floats returned by Fronius API

* default icons for grid im/export tariffs

* small typing fix

* Update homeassistant/components/fronius/sensor.py

Co-authored-by: Brett Adams <Bre77@users.noreply.github.com>

* DC icons

* prepend names with "Fronius" and device type

to get more reasonable default entity_ids (eg. have them next to each other when alphabetically sorted)

* remove config_flow and devices

* rename _FroniusUpdateCoordinator to FroniusCoordinatorBase

and mark ABC

* move SensorEntityDescriptions to sensor.py

* Revert "move SensorEntityDescriptions to sensor.py"

This reverts commit 2e5a726eb6.

* Don't raise ConfigEntryNotReady and use regular refresh method

* move bridge initialization out of helper class

* no coverage tests

* power_flow update interval 10 seconds

* move SensorEntityDescriptions to sensor.py

without introducing a circular dependency

* deprecation warning for CONF_MONITORED_CONDITIONS

* remove extra_state_attributes form meter sensor entities

* readd diagnostic entities

* decouple default entity_id from default name

* use key instead of name for entity_id

and make deprecated config key optional

* adjust tests

* use old entity_ids

these changes are now backwards compatible

* check coverage

* simplify entity description definitions

* restore entity names of previous implementation

Co-authored-by: Brett Adams <Bre77@users.noreply.github.com>

* Add config_flow for Fronius integration (#59677)

* Cleanup Fronius config_flow and tests (#60094)

* Add devices to Fronius integration (#60104)

* New entity names for Fronius entities (#60215)

* Adaptive update interval for Fronius coordinators (#60192)

Co-authored-by: Brett Adams <Bre77@users.noreply.github.com>
2021-11-24 02:04:36 +01:00
Hans Oischinger
38b976e6d6
Add vicare config flow (#56691)
* Configuration via UI

Config flow / YAML deprecation
- Support discovery via MAC address
- Support import of YAML config
- Switch to ConfigEntry, get rid of platform setup

* Fix review comments

* More tests for vicare yaml import
2021-11-22 15:06:42 +01:00
Marvin Wichmann
e5c33474e3
Add config and options flow to KNX integration (#59377) 2021-11-20 11:30:41 +01:00
Eduard van Valkenburg
958c199d80
Brunt package update with async, data update coordinator and config flow (#49714)
* implemented config_flow and dataupdatecoordinator

* implemented config flow, dataupdatecoordinator and tests.

* undid extra vscode task

* fixed pylint errors

* updates based on review

* fix mypy in reauth

* fast interval to 5 sec

* fixed test patches and others from review

* added released package

* deleted wrong line from coveragerc

* updates to config and tests

* fixed test patch
2021-11-18 23:00:42 +01:00
j-stienstra
0ae5b9e880
Add Jellyfin integration (#44401)
* Initial commit after scaffold setup

* Add initial config flow

* Create initial entity

* Ready for testing

* Can browse, no result yet

* Further improvements. Browsing is working.
Now need to work on proper stream URL

* Two valid URLs. Do not play in HA

* First working version for music

* Add thumbnail

* Includes Artist->Album hierarchy

* Add sorting of artists, albums and tracks

* Remove code for video libraries

* Improved code styling

* Optimize configuration flow

* Fix unit tests for config flow

* Fix import order

* Conform to style requirements

* Use empty string as media type for non playables

* 100% code coverage config_flow

* Type async_get_media_source

* Final docsctring fix after rebase

* Add __init__ and media_source files to .coveragerc

* Fix testing issues after rebase

* Fix string format issues and relative const import

* Remove unused manifest entries

* Raise ConfigEntry exceptions, not log errors

* Upgrade dependency to avoid WARNING on startup

* Change to builtin tuple and list (deprecation)

* Log broad exceptions

* Add strict typing

* Further type fixes after rebase

* Retry when cannot connect, otherwise fail setup

* Remove unused CONFIG_SCHEMA

* Enable strict typing checks

* FlowResultDict -> FlowResult

* Code quality improvements

* Resolve mypy.ini merge conflict

* Use unique userid generated by Jellyfin

* Update homeassistant/components/jellyfin/config_flow.py

Remove connection class from config flow

Co-authored-by: Milan Meulemans <milan.meulemans@live.be>

* Minor changes for additional checks after rebase

* Remove title from string and translations

* Changes wrt review

* Fixes based on rebase and review suggestions

* Move client initialization to separate file

* Remove persistent_notification, add test const.py

Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
2021-11-12 14:57:40 +01:00
Paulus Schoutsen
296f678d52
Add Evil Genius Labs integration (#58720)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-08 08:56:27 -08:00
Franck Nijhof
fdf1bfa140
Add RDW Vehicle information integration (#59240) 2021-11-06 19:34:51 +01:00
Aaron Bach
f7dea3aa1d
Add Ridwell integration (#57590) 2021-10-30 08:27:48 -06:00
Guido Schmitz
f1884d34e9
Add devolo home network integration (#45866)
Co-authored-by: Markus Bong <2Fake1987@gmail.com>
Co-authored-by: Markus Bong <Markus.Bong@devolo.de>
2021-10-28 22:42:10 +02:00
Dave T
e22aaea5b2
Aurora abb (solar) configflow (#36300)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-10-25 20:04:42 -05:00
Tim Rightnour
dad5d19a35
Add config flow to venstar (#58152) 2021-10-25 23:40:36 +02:00
Ryan Fleming
c84fee7c6e
Rework octoprint (#58040)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-22 15:25:12 +02:00
ANMalko
626bd25129
Add LOOKin integration (#58125)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-10-21 07:10:23 -10:00
Martin Hjelmare
31ccaac865
Add vlc telnet config flow (#57513) 2021-10-15 11:46:58 -07:00
Glenn Waters
d0b37229dd
Switch to config_flow for Environment Canada (#57127)
* Add config_flow to Environment Canada

* Add unique_id

* Remove erroneous directory.

* Tests working!!

* Add back setup.

* First cut of import.

* Temp

* Tweak names.

* Import config.yaml.

* Clean up imports.

* Import working! Some refactor to clean it up.

* Add import test.

* Small optimization.

* Fix comments from code review.

* Remove CONF_NAME and config_flow for it.

* Fixup strings to match new config_flow.

* Fixes for comments from last review.

* Update tests to match new import code.

* Clean up use of CONF_TITLE; fix lint error on push.

* Phew. More cleanup on import. Really streamlined now!

* Update tests.

* Fix lint error.

* Fix lint error, try 2.

* Revert unique_id to use location as part of ID.

* Fix code review comments.

* Fix review comments.
2021-10-11 17:33:29 +02:00
Robert Hillis
c4eeebd7a7
Add config flow for efergy (#56890) 2021-10-11 10:07:31 +02:00
Franck Nijhof
82160fa350
Add config flow to Stookalert (#57119) 2021-10-08 11:34:22 +02:00
icemanch
a95c6b10f7
Flux led config flow (#56354)
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-10-02 07:19:36 -10:00
Daniel Hjelseth Høyer
d5c3d234ec
Open garage, add config flow (#55290) 2021-09-29 09:43:51 -06:00
Myles Eftos
412ecacca3
Amberelectric (#56448)
* Add Amber Electric integration

* Linting

* Fixing some type hinting

* Adding docstrings

* Removing files that shouldn't have been changed

* Splitting out test helpers

* Testing the price sensor

* Testing Controlled load and feed in channels

* Refactoring mocks

* switching state for native_value and unit_of_measurement for native_unit_of_measurement

* Fixing docstrings

* Fixing requiremennts_all.txt

* isort fixes

* Fixing pylint errors

* Omitting __init__.py from test coverage

* Add missing config_flow tests

* Adding more sensor tests

* Applying suggested changes to __init.py__

* Refactor coordinator to return the data object with all of the relevent data already setup

* Another coordinator refactor - Better use the dictionary for when we build the sensors

* Removing first function

* Refactoring sensor files to use entity descriptions, remove factory

* Rounding renewable percentage, return icons correctly

* Cleaning up translation strings

* Fixing relative path, removing TODO

* Coordintator tests now accept new (more accurate) fixtures

* Using a description placeholder

* Putting missing translations strings back in

* tighten up the no site error logic - self._site_id should never be None at the point of loading async_step_site

* Removing DEVICE_CLASS, replacing the units with AUD/kWh

* Settings _attr_unique_id

* Removing icon function (it's already the default)

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Adding strings.json

* Tighter wrapping for try/except

* Generating translations

* Removing update_method - not needed as it's being overriden

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Fixing tests

* Add missing description placeholder

* Fix warning

* changing name from update to update_data to match async_update_data

* renaming [async_]update_data => [async_]update_price_data to avoid confusion

* Creating too man renewable sensors

* Override update method

* Coordinator tests use _async_update_data

* Using $/kWh as the units

* Using isinstance instead of __class__ test. Removing a zero len check

* Asserting self._sites in second step

* Linting

* Remove useless tests

Co-authored-by: jan iversen <jancasacondor@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-09-28 00:03:51 -07:00
Michael Chisholm
a28fd7d61b
Config-flow for DLNA-DMR integration (#55267)
* Modernize dlna_dmr component: configflow, test, types

* Support config-flow with ssdp discovery
* Add unit tests
* Enforce strict typing
* Gracefully handle network devices (dis)appearing

* Fix Aiohttp mock response headers type to match actual response class

* Fixes from code review

* Fixes from code review

* Import device config in flow if unavailable at hass start

* Support SSDP advertisements

* Ignore bad BOOTID, fix ssdp:byebye handling

* Only listen for events on interface connected to device

* Release all listeners when entities are removed

* Warn about deprecated dlna_dmr configuration

* Use sublogger for dlna_dmr.config_flow for easier filtering

* Tests for dlna_dmr.data module

* Rewrite DMR tests for HA style

* Fix DMR strings: "Digital Media *Renderer*"

* Update DMR entity state and device info when changed

* Replace deprecated async_upnp_client State with TransportState

* supported_features are dynamic, based on current device state

* Cleanup fully when subscription fails

* Log warnings when device connection fails unexpectedly

* Set PARALLEL_UPDATES to unlimited

* Fix spelling

* Fixes from code review

* Simplify has & can checks to just can, which includes has

* Treat transitioning state as playing (not idle) to reduce UI jerking

* Test if device is usable

* Handle ssdp:update messages properly

* Fix _remove_ssdp_callbacks being shared by all DlnaDmrEntity instances

* Fix tests for transitioning state

* Mock DmrDevice.is_profile_device (added to support embedded devices)

* Use ST & NT SSDP headers to find DMR devices, not deviceType

The deviceType is extracted from the device's description XML, and will not
be what we want when dealing with embedded devices.

* Use UDN from SSDP headers, not device description, as unique_id

The SSDP headers have the UDN of the embedded device that we're interested
in, whereas the device description (`ATTR_UPNP_UDN`) field will always be
for the root device.

* Fix DMR string English localization

* Test config flow with UDN from SSDP headers

* Bump async-upnp-client==0.22.1, fix flake8 error

* fix test for remapping

* DMR HA Device connections based on root and embedded UDN

* DmrDevice's UpnpDevice is now named profile_device

* Use device type from SSDP headers, not device description

* Mark dlna_dmr constants as Final

* Use embedded device UDN and type for unique ID when connected via URL

* More informative connection error messages

* Also match SSDP messages on NT headers

The NT header is to ssdp:alive messages what ST is to M-SEARCH responses.

* Bump async-upnp-client==0.22.2

* fix merge

* Bump async-upnp-client==0.22.3

Co-authored-by: Steven Looman <steven.looman@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-27 15:47:01 -05:00
Daniel Hjelseth Høyer
6e7bc65e2e
Airthings (#56578) 2021-09-23 13:20:30 -07:00
Aaron Bach
aabc8cd2d5
Add WattTime integration (#56149) 2021-09-20 21:10:24 -07:00
RenierM26
3ce8109e5e
Add config flow to Switchbot (#50653)
Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-18 09:25:05 -10:00
Ricardo Steijn
2a51bb5bba
Add Crownstone integration (#50677) 2021-09-14 09:46:52 -10:00
Robert Hillis
14aa9c91eb
Add Config Flow to Modem Caller ID integration (#46677)
* Add phone_modem integration

* Use original domain

* Add init tests for Modem Caller ID

* Clean up tests

* Clean up tests

* apply suggestions

* Fix tests

* Make only one instance possible

* Allow more than 1 device and remove hangup service

* simplify already configured

* Update sensor.py

* Update config_flow.py

* Fix manifest

* More cleanup

* Fix tests

* Ue target

* Clean up sensor.py

* Minor tweaks

* Close modem on restart and unload

* Update requirements

* fix tests

* Bump phone_modem

* rework

* add typing

* use async_setup_platform

* typing

* tweak

* cleanup

* fix init

* preserve original name

* remove callback line

* use list of serial devices on host

* tweak

* rework

* Rework for usb dicsovery

* Update requirements_test_all.txt

* Update config_flow.py

* tweaks

* tweak

* move api out of try statement

* suggested tweaks

* clean up

* typing

* tweak

* tweak

* async name the service
2021-09-13 14:22:54 -10:00
Abílio Costa
c869b78ac1
Add Whirlpool integration (#48346)
* Add Whirlpool integration

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Apply suggestions from code review

* Fix lint

* Fix lint and tests

* Apply suggestions from code review

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

* Use dict lookups

* Lint

* Apply code changes from PR review

* Do real integration setup in tests

* Apply suggestions from review & fix test

* Replace get with array operator

* Add suggestions from code review

* Rename test var

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-13 10:02:34 -10:00
Daniel Hjelseth Høyer
f9de8fb49a
Surepetcare config flow (#56127)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-13 09:57:06 -10:00
starkillerOG
5f86388f1c
Netgear config flow (#54479)
* Original work from Quentame

* Small adjustments

* Add properties and method_version

* fix unknown name

* add consider_home functionality

* fix typo

* fix key

* swao setup order

* use formatted mac

* add tracked_list option

* add options flow

* add config flow

* add config flow

* clean up registries

* only remove if no other integration has that device

* tracked_list formatting

* convert tracked list

* add import

* move imports

* use new tracked list on update

* use update_device instead of remove

* add strings

* initialize already known devices

* Update router.py

* Update router.py

* Update router.py

* small fixes

* styling

* fix typing

* fix spelling

* Update router.py

* get model of router

* add router device info

* fix api

* add listeners

* update router device info

* remove method version option

* Update __init__.py

* fix styling

* ignore typing

* remove typing

* fix mypy config

* Update mypy.ini

* add options flow tests

* Update .coveragerc

* fix styling

* Update homeassistant/components/netgear/__init__.py

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

* Update homeassistant/components/netgear/__init__.py

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

* Update homeassistant/components/netgear/__init__.py

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

* Update homeassistant/components/netgear/config_flow.py

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

* Update homeassistant/components/netgear/router.py

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

* add ConfigEntryNotReady

* Update router.py

* use entry.async_on_unload

* Update homeassistant/components/netgear/device_tracker.py

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

* use cv.ensure_list_csv

* add hostname property

* Update device_tracker.py

* fix typo

* fix isort

* add myself to codeowners

* clean config flow

* further clean config flow

* deprecate old netgear discovery

* split out _async_remove_untracked_registries

* Update homeassistant/components/netgear/config_flow.py

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

* Update homeassistant/components/netgear/config_flow.py

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

* cleanup

* fix rename

* fix typo

* remove URL option

* fixes

* add sensor platform

* fixes

* fix removing multiple entities

* remove extra attributes

* initialize sensors correctly

* extra sensors disabled by default

* fix styling and unused imports

* fix tests

* Update .coveragerc

* fix requirements

* remove tracked list

* remove tracked registry editing

* fix styling

* fix discovery test

* simplify unload

* Update homeassistant/components/netgear/router.py

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

* add typing

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

* add typing

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

* add typing

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

* condense NetgearSensorEntities

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

* Update homeassistant/components/netgear/router.py

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

* Update homeassistant/components/netgear/router.py

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

* Update homeassistant/components/netgear/router.py

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

* Update homeassistant/components/netgear/router.py

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

* add typing

* styling

* add typing

* use ForwardRefrence for typing

* Update homeassistant/components/netgear/device_tracker.py

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

* add typing

* Apply suggestions from code review

Thanks!

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

* process review comments

* fix styling

* fix devicename not available on all models

* ensure DeviceName is not needed

* Update homeassistant/components/netgear/config_flow.py

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

* Update homeassistant/components/netgear/config_flow.py

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

* Update __init__.py

* fix styling

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-13 18:18:21 +02:00
Alan Tse
98ecf2888c
Remove tesla integration (#55988)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-09-08 22:12:03 -07:00
Greg
3bd9be2f6d
Add IoTaWatt integration (#55364)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-08-30 12:52:29 -07:00
Milan Meulemans
8570502681
Convert Nanoleaf yaml and discovery to config flow (#52199)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-08-24 14:09:36 -05:00
Joakim Plate
1f4c12195e
Fjäråskupan kitchen fan (#53140)
* Add fjäråskupan fan control

* Update tests/components/fjaraskupan/conftest.py

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

* Update homeassistant/components/fjaraskupan/config_flow.py

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

* Update homeassistant/components/fjaraskupan/config_flow.py

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

* Increase manual update to 2 minutes

* Address review comments

* Switch to discovery flow

* Address more review comments

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-20 13:41:36 +02:00
Klaas Schoute
68fbc0792a
Add P1 Monitor integration (#54738)
* Init integration P1 Monitor

* Fix build error

* Add quality scale

* Remove last_reset and icon

* Change list to tuple

* Close client on connection exception

* Change min value to 5 (seconds)

* the used python package will close it

* Remove the options flow

* Add session and close client

* Smash to a single DataUpdateCoordinator

* Make a custom update coordinator class

* await the coordinator close

* Add second await the coordinator close

* Close when exit scope

* Removed unused code

* Fix test_sensor on entity_id change

* Fix test on test_sensor

* Transfer SENSOR dict to sensor platform

* device class for cost entity update entity_name

* Revert name in unique id and update sensor test

* Update code based on suggestions

* Fix typing

* Change code to fix mypy errors

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-20 08:45:04 +02:00
Paulus Schoutsen
4ae2a26aa3
Add config flow to Rainforest EAGLE-200 (#54846)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-19 09:22:30 -07:00
LonePurpleWolf
35f563e23e
Airtouch4 integration (#43513)
* airtouch 4 climate control integration

* enhance tests for airtouch. Fix linting issues

* Fix tests

* rework tests

* fix latest qa issues

* Clean up

* add already_configured message

* Use common string

* further qa fixes

* simplify airtouch4 domain storage

Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-17 17:29:20 +02:00
J. Nick Koston
5e51f57f02
Convert nmap_tracker to be a config flow (#54715) 2021-08-16 15:19:32 -05:00
Gleb Sinyavskiy
25eb27cb9f
Add tractive integration (#51002)
* Scaffold

* Implement config flow

* Add dymmy device tracker and TractiveClient

* Add simple DeviceTracker

* Add device info

* Listen to tractive event and update tracker entities accordingly

* Refactoring

* Fix logging level

* Handle connection errors

* Remove sleep

* Fix logging

* Remove unused strings

* Replace username config with email

* Update aiotractive

* Use debug instead of info

* Cover config_flow

* Update .coveragerc

* Add quality scale to manifest

* pylint

* Update aiotractive

* Do not emit SERVER_AVAILABLE, properly handle availability

* Use async_get_clientsession

Co-authored-by:  Daniel Hjelseth Høyer <mail@dahoiv.net>

* Add @Danielhiversen as a codeowner

* Remove the title from strings and translations

* Update homeassistant/components/tractive/__init__.py

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

* Force CI

* Use _attr style properties instead of methods

* Remove entry_type

* Remove quality scale

* Make pyupgrade happy

Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-08-05 12:47:42 +02:00
Joakim Sørensen
caf0bdd5b9
Add config flow to uptimerobot (#53938) 2021-08-04 22:20:03 +02:00
Martin Hjelmare
007ecc51e5
Revert "Add Automate Pulse Hub v2 support (#39501)" (#53704) 2021-07-29 11:58:48 -07:00
epenet
8d84edd3b7
Add renault integration (#39605) 2021-07-28 12:41:11 -07:00
Diogo Gomes
7ad7cdad3d
Add Prosegur Alarms (#44679)
Co-authored-by: Franck Nijhof <frenck@frenck.dev>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-27 22:19:58 +02:00
Ron Klinkien
3488053648
Remove garmin_connect integration (#52808)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-27 21:49:49 +02:00
gjong
9f495fd200
Add initial version for the YouLess integration (#41942)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-27 17:42:15 +02:00
G Johansson
f0d5ae2fec
Add yale_smart_alarm config flow and coordinator (#50850)
* config flow and coordinator

* comply with pylint

* Remove pylint errors

* Update test coverage yale smart alarm

* Update test config_flow

* Fix test already configured

* Second try test already configured

* Fixes config flow and tests

* Conform pylint errors coordinator

* Fix various review remarks

* Correct entity unique id

* Fix unique id and migrate entries

* Remove lock code

* Remove code from test

* Expand code coverage config flow test

* Add more constants

* Add test new requirements

* Minor corrections

* Resolve conflict alarm schema

* Change logger

* Changed from review

* Fix isort error

* Fix flake error

* Ignore mypy errors

* Corrections from PR review no 2

* Corrections from PR review no 3

* Added tests and fix pylint error

* Corrections from PR review no 4

* Corrections from PR review no 5

* Corrections from PR review no 6

* Corrections from PR review no 6_2

* Corrections from PR review no 7

* Corrections from PR review no 8

* Minor last changes for PR

* Update homeassistant/components/yale_smart_alarm/coordinator.py

Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
2021-07-24 13:55:43 -04: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
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
Daniel Hjelseth Høyer
f0b28c90bf
Co2signal configflow (#53193)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-07-19 21:30:00 -07: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
Shay Levy
ea6e325762
Add Switcher config flow discovery support (#52316) 2021-07-19 06:28:40 -07: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
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
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
Rob Bierbooms
aa56a21b45
Add config flow step user to dsmr (#50318)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-24 10:16:08 +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
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
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
indykoning
85f758380a
Add Growatt Server Config flow (#41303)
* Growatt Server Config flow

* Use reference strings

Co-authored-by: SNoof85 <snoof85@gmail.com>

* Remove configuration.yaml import logic

* Removed import test

* Re-added PLATFORM_SCHEMA validation

* Import yaml from old yaml configuration

* Apply suggestions from code review

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

* Feedback

* Use Executor for IO only

* Fix imports

* update requirements

* Fix flake8

* Run every section of fetching devices in single executor

* Config flow feedback

* Clean up

* Fix plan step

* Fix config flow test

* Remove duplicate test

* Test import step

* Test already configured entry

* Clean up tests

* Add asserts

* Mock out entry setup

* Add warning if set up via yaml

Co-authored-by: SNoof85 <snoof85@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-10 22:46:50 +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
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
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
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
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
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
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
Raman Gupta
aae0ccc588
Add config flow support to google_travel_time (#43509)
* add config flow support to google_travel_time

* fix bugs and add strings

* fix import and add new test

* address comments in #43419 since this is a similar PR

* fix default name and test

* add unique ID and device info

* fix test

* feedback from waze PR

* continue incorporating feedback from waze PR

* final fixes and update tests

* call update in lambda

* Update homeassistant/components/google_travel_time/sensor.py

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

* additional fixes

* validate config entry data during config flow and config entry setup

* don't store entity

* patch dependency instead of HA code

* fixes

* improve tests by moving all patching to fixtures

* use self.hass instead of setting self._hass

* invert if

* remove unnecessary else

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-31 22:10:24 +02:00
chemaaa
1b60c8efb8
Add Homepluscontrol integration (#46783)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-25 14:12:31 +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
Franck Nijhof
059e9e8307
Add config flow to Verisure (#47880)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-03-15 12:30:44 -07:00
Khole
cfeb8eb06a
Add Hive config flow (#47300)
* Add Hive UI

* Fix tests and review updates

* Slimmed down config_flow

* Fix tests

* Updated Services.yaml with extra ui attributes

* cleanup config flow

* Update config entry

* Remove ATTR_AVAILABLE

* Fix Re-Auth  Test

* Added more tests.

* Update tests
2021-03-15 12:27:10 +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
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
Andrey Kupreychik
accba85e35
Add keenetic_ndms2 config flow (#38353) 2021-02-14 13:09:19 +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
ollo69
f38b06ed6d
Add Asuswrt Config Flow and Scanner Entities (#46468)
* Add Asuswrt config flow (#43948)

* Add AsusWrt Scanner Entity (#44759)

* Add Scanner Entity

- device tracker entity changed from "DeviceScanner" to "ScannerEntity"
- sensors recoded to use "router" class
- config entry review to allow multiple entity (for future use)

* Force checks

* Removed new option and change sensors

* Update test_sensor.py

* Requested changes

* Removed router unique-id

* Update last_activity attr only when available

* Add Options for AsusWRT Scanner Entity (#44808)

* Add Asuswrt config flow (#43948)

* Add AsusWrt Scanner Entity (#44759)

* Add Scanner Entity

- device tracker entity changed from "DeviceScanner" to "ScannerEntity"
- sensors recoded to use "router" class
- config entry review to allow multiple entity (for future use)

* Force checks

* Removed new option and change sensors

* Update test_sensor.py

* Requested changes

* Removed router unique-id

* Update last_activity attr only when available

* Add Options for Scanner Entity

* Fix isort

* Removed "Track New" option

* Add Options for Scanner Entity

* Fix isort

* Removed "Track New" option

* Add test for all the options in the config flow
2021-02-13 19:17:06 +01:00
Joakim Plate
8dc06e612f
Add config flow to philips_js (#45784)
* Add config flow to philips_js

* Adjust name of entry to contain serial

* Use device id in event rather than entity id

* Adjust turn on text

* Deprecate all fields

* Be somewhat more explicit in typing

* Switch to direct coordinator access

* Refactor the pluggable action

* Adjust tests a bit

* Minor adjustment

* More adjustments

* Add missing await in update coordinator

* Be more lenient to lack of system info

* Use constant for trigger type and simplify

* Apply suggestions from code review

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

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-02-11 21:37:53 +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
Brandon Rothweiler
4b208746e5
Add Mazda Connected Services integration (#45768) 2021-02-03 17:38:12 +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
Pascal Reeb
ba55f1ff4b
Add config flow for nuki (#45664)
* implemented config_flow for nuki component

* warn -> warning

* exception handling & config_flow tests

* gen_requirements_all

* Update config_flow.py

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2021-01-29 11:05:13 +01:00
springstan
566058f701
Add config flow to fritzbox_callmonitor (#40736) 2021-01-27 16:53:45 +01:00
Dennis Schroer
8d572af77a
Add Huisbaasje integration (#42716)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-01-27 15:53:25 +01:00
William Scanlon
260d9f8e16
Upgrade econet to use new API (#44427)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-26 09:18:20 +01:00
J. Nick Koston
431b143eec
Add a one touch pairing config flow for lutron caseta (#45136)
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2021-01-22 17:48:06 -06:00
Sergio Conde Gómez
83b210061d
Add config_flow and stream selection to foscam (#41429)
* Add config_flow and stream selection to foscam

* Simplify config_flow steps

* Make debug log entry more useful

* Deprecate config and platform schemas

* Simplify config loading

* Add config flow testing

* Remove unneeded CONFIG_SCHEMA deprecation

* Improve test coverage

* Unload service by tracking loaded entries

* Address comment

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-01-13 16:09:05 +01:00
Charles Garwood
d68fdbc283
Add zwave_js integration (#45020)
* Run zwave_js scaffold (#44891)

* Add zwave_js basic connection to zwave server (#44904)

* add the basic connection to zwave server

* fix name

* Fix requirements

* Fix things

* Version bump dep to 0.1.2

* fix pylint

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Bump zwave-js-server-python to 0.2.0

* Use zwave js server version check instead of fetching full state (#44943)

* Use version check instead of fetching full state

* Fix tests

* Use 0.3.0

* Also catch aiohttp client errors

* Update docstring

* Lint

* Unignore zwave_js

* Add zwave_js entity discovery basics and sensor platform (#44927)

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

* Complete zwave_js typing (#44960)

* Type discovery

* Type init

* Type entity

* Type config flow

* Type sensor

* Require typing of zwave_js

* Complete zwave_js config flow test coverage (#44955)

* Correct zwave_js sensor device class (#44968)

* Fix zwave_js KeyError on entry setup timeout (#44966)

* Bump zwave-js-server-python to 0.5.0 (#44975)

* Remove stale callback signal from zwave_js (#44994)

* Add light platform to zwave_js integration (#44974)

* add light platform

* styling fix

* fix type hint

* Fix typing

* Update homeassistant/components/zwave_js/const.py

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

* Update homeassistant/components/zwave_js/entity.py

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

* Update homeassistant/components/zwave_js/entity.py

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

* Update homeassistant/components/zwave_js/entity.py

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

* Update homeassistant/components/zwave_js/entity.py

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

* Update homeassistant/components/zwave_js/entity.py

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

* color temp should be integer

* guard Nonetype error

* Update homeassistant/components/zwave_js/light.py

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

* Update homeassistant/components/zwave_js/light.py

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

* some fixes after merging

* add additional guards for None values

* adjustments for rgb lights

* Fix typing

* Fix black

* Bump zwave-js-server-python to 0.6.0

* guard value updated log

* remove value_id lookup as its no longer needed

* fiz sending white value

* Update homeassistant/components/zwave_js/light.py

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

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

* Add zwave_js test foundation (#44983)

* Exclude text files from codespell

* Add basic dump fixture

* Add test foundation

* Fix test after rebase

* Exclude jsonl files from codespell

* Rename fixture file type to jsonl

* Update fixture path

* Fix stale docstring

* Add controller state json fixture

* Add multisensor 6 state json fixture

* Update fixtures

* Remove basic dump fixture

* Fix fixtures after library bump

* Update codeowner

* Minor cleanup Z-Wave JS (#45021)

* Update zwave_js device_info (#45023)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-01-11 00:08:25 +01:00
J. Nick Koston
4b54694c5c
Add config flow for somfy_mylink (#44977)
* Add config flow for somfy_mylink

* fix typo
2021-01-10 20:24:22 +01:00
JeromeHXP
de780c6d35
Add Ondilo ico integration (#44728)
* First implementationof Ondilo component support

* Update manifest toadd pypi pkg dependency

* Update entities name and corrected refresh issue

* Changed percentage unit name

* Corrected merge issues

* Updated coveragerc

* cleaned up code and corrected config flow tests

* Code cleanup and added test for exisitng entry

* Changes following PR comments:
- Inherit CoordinatorEntity instead of Entity
- Merged pools blocking calls into one
- Renamed devices vars to sensors
- Check supported sensor types
- Stop relying on array index position for pools
- Stop relying on attribute position in dict for sensors

* Corrected unit test

* Reformat sensor type check
2021-01-04 08:09:01 -08:00
J.P. Krauss
e37bb51320
Add AirNow Integration (#40091) 2020-12-30 20:25:57 +01:00
rikroe
e5f31665b1
Add Config Flow to bmw_connected_drive (#39585)
* Add Config Flow to bmw_connected_drive

* Fix checks for bmw_connected_drive

* Adjust code as requested

* Clean .coveragerc after merge

* Use references for config flow

* Fix execute_service check against allowed accounts

* Adjust translation as username can be email or phone no

* Add BMWConnectedDriveBaseEntity mixin, remove unnecessary type casts

* Use BaseEntity correctly, fix pylint error

* Bump bimmer_connected to 0.7.13

* Adjustments for review

* Fix pylint

* Fix loading notify, move vin to entity attrs

* Remove vin from device registry

* Remove commented-out code

* Show tracker warning only if vehicle (currently) doesn't support location

* Remove unnecessary return values & other small adjustments

* Move original hass_config to own domain in hass.data

* Move entries to separate dict in hass.data

* Remove invalid_auth exception handling & test as it cannot happen

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2020-12-29 11:06:12 +01:00
Tim van Cann
1f27fb4644
Fully remove Avri integration (#44478)
* Fully remove Avri integration

* Remove avri from .coveragerc
2020-12-27 09:30:20 +01:00