Commit Graph

1958 Commits (b5a6ee3c567aa50633ef47d342af685fb75e5219)

Author SHA1 Message Date
Franck Nijhof 88c9422b70
Add diagnostics support to Stookalert (#64747)
* Add diagnostics support to Stookalert

* coveragerc
2022-01-24 01:36:41 +02:00
Franck Nijhof 0ae2ffd467
Add diagnostics support to Verisure (#64789)
* Add diagnostics support to Verisure

* coveragerc
2022-01-24 01:36:22 +02:00
Andre Lengwenus d5ec2fe842
Add tests for LCN light platform (#64741) 2022-01-23 07:45:22 -10:00
Hans Oischinger c23b2135a3
Add vicare one-time charge (#64376)
* vicare: Add OneTime Charge

* Integrate review comments

* Simplify button entity
2022-01-23 18:27:19 +01:00
J. Nick Koston 50b2e9d794
Prevent lookin polling when push updates are coming in (#64687)
Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2022-01-22 21:19:34 -10:00
Shay Levy 12780a3173
Add webostv 100% tests coverage for media player (#64723) 2022-01-22 14:06:48 -10:00
Andre Lengwenus 19e3c08c56
Add tests for LCN switch platform (#52590) 2022-01-22 10:41:25 -10:00
Franck Nijhof 511546631a
Add diagnostics support to Open-Meteo (#64645) 2022-01-22 13:47:51 +01:00
Michael 443f50cde6
Add diagnostics to Synology DSM integration (#64480) 2022-01-21 11:37:11 -08:00
jjlawren 53aed22d5c
Add diagnostics support to Sonos (#64576)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-01-20 13:26:54 -08:00
G Johansson 543064d7b7
Implement config flow dnsip (#62843) 2022-01-20 10:45:58 -10:00
sebfortier2288 a9785f1b41
Add support for Soma Tilt devices (#49734) 2022-01-20 10:21:54 -10:00
Guido Schmitz 144371d843
Add siren platform to devolo Home Control (#53400)
* Rework mocking

* Add siren platform

* Rebase with dev

* React on change of default tone

* Fix linting error
2022-01-20 08:10:06 -05:00
Michael 09297520c0
Let the new wrapper just extend the `FritzBoxTools` class (#64133)
* let wrapper just extend the FritzBoxTools class

* keep avm_device in method names
2022-01-20 12:43:32 +01: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
Mick Vleeshouwer 2503530b8c
Add diagnostics to Overkiz integration (#64427) 2022-01-19 15:51:52 -08:00
Matthias Alphart 10538aabbf
Add diagnostics to KNX (#64471) 2022-01-19 12:46:10 -08:00
Shay Levy e6c7c01e6c
Add webostv 100% tests coverage for notify (#64412)
* Add webostv 100% tests coverage for notify

* Apply review comments

* Fix assert
2022-01-19 13:13:55 +02:00
Franck Nijhof 8cfe6ef25a
Add diagnostics support to Tuya (#64374) 2022-01-18 12:44:09 -08: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
Mick Vleeshouwer 313ad2ecde
Add switch entity to Overkiz integration (#64000) 2022-01-17 08:21:37 -10:00
J. Nick Koston 3d7572843e
Add switch platform to nexia (#64205) 2022-01-16 09:38:29 -10:00
J. Nick Koston 187b4fad84
Update nexia climate platform to use newer standards (#64186) 2022-01-16 07:51:16 -10: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
Anton Malko 6a3de6ab10
Add light platform to LOOKin (#64076) 2022-01-13 17:07:02 -10:00
Mick Vleeshouwer 5e3bfabfcf
Add select entity to Overkiz integration (#62916) 2022-01-13 12:35:44 -10:00
G Johansson c021e58ee2
Implement binary_sensor in yale_smart_alarm (#63937) 2022-01-12 23:34:43 -10:00
J. Nick Koston b23be22c67
Add light platform to SenseME (#63772)
Co-authored-by: Big Mike <mikelawrence@users.noreply.github.com>
2022-01-12 15:04:00 -08:00
Simone Chemelli bdea7fad75
Fritz: introduce wrapper.py - part 1 (sensor) (#63682)
* Revert "Improve availability for Shelly Valve"

This reverts commit d8cbd81b456820153522e6d86bbd00c4a4a31129.

* Fritz: introduce api.py - part 1 (sensor)

* Revert

* coverage

* Apply review comments

* Better naming

* Coverage

* fix naming

* Avoid "ignore[no-any-return]"
2022-01-11 17:31:52 -10:00
G Johansson 17bf51a855
Implement lock to yale_smart_alarm (#63643) 2022-01-11 09:20:15 -10:00
Jonathan Keslin 56c577c832
Expose power & energy usage of VeSync outlets as separate sensors (#61837) 2022-01-10 09:39:31 -08:00
J. Nick Koston b658c053ec
Add switch platform to SenseME (#63719) 2022-01-09 17:16:19 -10:00
J. Nick Koston 8e0b124875
Add binary_sensor platform to SenseME (#63660) 2022-01-08 19:52:51 -10: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
Tuen Lee 8b216db885
Tuya Alarm Initial commit (#60080) 2022-01-07 14:20:30 +01:00
rikroe e9dec5d03a
Add button entities to bmw_connected_drive (#63136)
Co-authored-by: Gerard <gerard33@users.noreply.github.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2022-01-06 12:05:25 +01:00
Franck Nijhof ed791aa854
Add sensor tests to PVOutput (#63400) 2022-01-05 11:15:18 +01:00
Franck Nijhof 56520b69ac
Remove deprecated Arduino integration (#63406) 2022-01-05 09:15:50 +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
Franck Nijhof 919aa95f97
Improve test coverage for PVOutput (#63048) 2022-01-04 20:20:39 +01:00
Joakim Plate 7c6297db86
Add support for philips js screen state (#62775) 2022-01-04 16:14:44 +01: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 c6230fef08
Add full test coverage to CPU Speed (#63042) 2021-12-29 22:59:14 +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 90a9d64f67
Add reauthentication handling to PVOutput (#62932) 2021-12-28 17:28:35 +01:00
Mick Vleeshouwer 41c497ee6e
Add binary sensor entity to Overkiz integration (#62913) 2021-12-27 23:10:39 -10:00
Mick Vleeshouwer 0bcb0a6267
Add scene entity to Overkiz integration (#62884) 2021-12-27 13:57:19 -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
Mick Vleeshouwer cf6fb7bf39
Add light entity to Overkiz integration (#62835) 2021-12-27 12:35:59 +01:00
Mick Vleeshouwer c37077aa9b
Add number entity to Overkiz integration (#62732) 2021-12-24 10:29:51 -10:00
Mick Vleeshouwer fb04b19960
Add button entity to Overkiz integration (#62719) 2021-12-23 14:21:47 -10:00
Mick Vleeshouwer f722931920
Add lock entity to Overkiz integration (#62713) 2021-12-23 13:28:01 -10:00
Mick Vleeshouwer 3605c4f32f
Add Overkiz integration (with base + sensor entity) (#62640) 2021-12-23 08:34:35 -10:00
Mick Vleeshouwer c3917fc250
Remove TaHoma integration (#62607) 2021-12-23 16:17:51 +01:00
Allen Porter 23277181ca
Increase test coverage for google calendar (#62648)
* Increase test coverage for google calendar

Update tests to exercise the API responses, getting test coverage
to 97% for calendar.py

----------- coverage: platform linux, python 3.9.6-final-0 -----------
Name                                          Stmts   Miss  Cover   Missing
---------------------------------------------------------------------------
homeassistant/components/google/__init__.py     193     84    56%   92, 163-228, 238, 244-247, 254-262, 274, 298-299, 305-347, 387-392, 416-430, 435-437
homeassistant/components/google/calendar.py     122      4    97%   41, 45, 51, 135
---------------------------------------------------------------------------
TOTAL                                           315     88    72%

* Revert conftest changes

* Update typing errors found on CI

* Update python3.8 typing imports

* Remove commented out code
2021-12-23 07:31:56 +01:00
Franck Nijhof 6ef7539a31
Add base integration tests to Luftdaten (#62594) 2021-12-23 07:25:26 +01: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
Aaron Bach ebfe9aa384
Add a switch to opt-in to/opt-out of the next Ridwell pickup (#62293)
* Add buttons to opt into/out of the next Ridwell pickup

* Buttons finished

* Coverage

* better name

* Move to switch

* Clean up

* Coverage

* Use correct exception
2021-12-18 23:06:17 -07:00
Franck Nijhof 0dbd948867
Add Open-Meteo integration (second attempt) (#61742) 2021-12-16 21:12:33 +01:00
Simone Chemelli 105ad861bd
Add buttons and deprecate services for Fritz (#61483)
* Add buttons and deprecate services

* Exclude tests

* Log full service name
2021-12-16 13:25:06 +01:00
Martin Hjelmare 0662ab019f
Improve balboa tests (#61691) 2021-12-13 17:11:21 +01:00
Anton Malko e5b04cedf3
Add media_player platform to Lookin (#61337)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-12-10 08:52:51 -10:00
alim4r 7d256f56c5
Refactor Prometheus tests (#60451)
* Removed prometheus from .coveragerc

* Update prometheus tests with handler categories

* Updated prometheus metrics to use the current registry
- don't use the registry created on import (needed for tests)

* Reset the prometheus CollectorRegistry before every test

* Update prometheus metrics generation
- Use latest registry when generating a response

* Add default collectors when resetting the registry

* Move entities to the specific prometheus test case

* Refactor body generation for prometheus tests

* Add test case for sensors without unit after rebase

* Fix prometheus tests
- Wait for events in prometheus tests
- Add workaround for demo platform dependecy conversation (aiohttp frozen router)

* Added prometheus tests for attribute metrics

* Added prometheus tests for binary_sensor

* Add prometheus test for input_boolean

* Add prometheus test for lights

* Add prometheus test for lock

* Add prometheus test for sensor fahrenheit conversion

* Fix prometheus test for input_number
2021-12-08 20:18:21 +01:00
jjlawren 9f3a4c3617
Improve Sonos tests, begin adding coverage (#61198)
* Update entity registry handling

* Add and use fixtures to test setup via config entry

* Remove legacy redundant tests

* Remove unnecessary mock_coro

* Remove unnecessary namespace change

* Move zeroconf payload to fixture

* Begin adding Sonos to codecov

* Mock proper return value

* Revert return value for platform
2021-12-08 19:28:27 +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
Charles Garwood 00a82bf945
Remove loopenergy integration (#61175)
* Remove loopenergy integration

* Fix requirements_all.txt

* Fix requirements_test_all.txt
2021-12-07 19:47:44 +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
micha91 f94085c83e
Add Yamaha MusicCast Select Entities (#60645)
* Add select entity for Yamaha MusicCast Capabilities

* Add musiccast select to .coveragerc

* Move status strings to string.select.json and auto generate the english translations from it. Let the device class start with yamaha_musiccast__.

* Make all device classes lower case

* Use platform enum to add select
2021-12-06 18:05:49 +01:00
Milan Meulemans a7e129a952
Add Aseko Pool Live integration (#56299) 2021-12-05 17:02:46 -10:00
Kevin Worrel 9d1985ab03
Move screenlogic SCG levels to number platform (#60872)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-12-02 16:36:31 -10:00
Joakim Sørensen 737dd6fc26
Add tests to hassio binary_sensor platform (#60609) 2021-12-01 21:41:31 +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
Matthias Lohr 7b81185d2a
Add tolo fan platform (#60502) 2021-11-29 17:15:38 +01:00
Jesse Hills 622d9606a5
Esphome/button (#60522) 2021-11-29 09:57:37 +01:00
micha91 b4730f4ffe
Add Yamaha MusicCast number entities (#60093) 2021-11-28 07:52:46 -10:00
Matthias Lohr db0104c2c9
Add tolo binary_sensor platform (#60365) 2021-11-25 22:39:39 +01:00
Matthias Lohr 4360fb733f
Add tolo button platform (#60345) 2021-11-25 22:02:59 +01:00
Tim Rightnour 03d1efab46
Add Balboa Spa integration (#59234) 2021-11-25 12:04:06 -06:00
Matthias Lohr 2f0ec0d7e5
Add tolo select platform (#60326) 2021-11-25 14:41:57 +01:00
Matthias Lohr 3372288c88
Add tolo sensor platform (#60308) 2021-11-25 12:29:09 +01:00
Matthias Lohr 5853d81944
Add tolo light platform (#60305) 2021-11-24 22:26:08 +01:00
Franck Nijhof 37219e8d04
Add button platform to Tuya (#60304) 2021-11-24 21:10:26 +01: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
Milan Meulemans 5550b5445b
Add Button platform to Nanoleaf (#60169)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-11-23 01:26:37 +01:00
Tim Rightnour 3639481027
Add sensors to venstar integration (#58851) 2021-11-22 18:05:12 -06: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
Simone Chemelli c4128f853d
Add climate platform to Shelly (#59712)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-11-21 16:34:00 -06:00
Marvin Wichmann 1d63ae8696
Code quality improvements for KNX integration (#60024) 2021-11-20 16:15:33 +01:00
Marvin Wichmann e5c33474e3
Add config and options flow to KNX integration (#59377) 2021-11-20 11:30:41 +01:00
Ullrich Neiss 40104de0bf
Address late review of kostal plenticore (#59998) 2021-11-20 11:16:53 +01:00
Daniel Hjelseth Høyer a3d5aec778
Mill local access (#59549)
* Mill local

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Mill local

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Mill local

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Update homeassistant/components/mill/config_flow.py

Co-authored-by: Allen Porter <allen@thebends.org>

* Update homeassistant/components/mill/config_flow.py

Co-authored-by: Allen Porter <allen@thebends.org>

* Update homeassistant/components/mill/config_flow.py

Co-authored-by: Allen Porter <allen@thebends.org>

* Fix review comments

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* coveragerc

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Fix review comments

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Fix review comments

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Fix review comments

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

Co-authored-by: Allen Porter <allen@thebends.org>
2021-11-18 21:44:45 -08: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
Ullrich Neiss 3dc0b9537c
Move Kostal Plenticore writable settings from sensor to select widget or switch (#56529)
* Move "Battery:SmartBatteryControl:Enable" from a simple sensor to a switch
Add "Battery:TimeControl:Enable" as a switch

If you want to change charging behavior you need to turn off both switches, before you can enable the function you want. (Same as on Plenticore UI)

* removed:
    @property
    def assumed_state(self) -> bool

was copied from an switchbot integration, does not make sense or does deliver valuable information

Tried to set constant properties in the constructor

* correct typo, add new line at eof

* Initial state of switch was missing after (re)starting HA. Now working.

* Reformatted with black

* correct syntax errors from test run 09.10.2021

* reformat

* update 15.10.2021

* Set select value is working

* update 05.11.2021

* data correctly received

* working completly

* remove old switch definitions, now replaced by select widget

* correct complaints from workflow run on 11/11/2021

* Add explanatory comment for switch and select

* Correct comments

* Removed function async def async_read_data(self, module_id: str, data_id: str)
from class SettingDataUpdateCoordinator

* Add Mixin class for read/write

* try to make select.py less "stale"

* new dev environment 2

* new dev environment 2

* correct syntax

* minor coding standard correction

* Remove BOM

* Remove BOM on select.py

* Updated .coveragerc
2021-11-18 16:06:32 +01:00
Thomas Schamm 92ca94e915
Add cover platform to bosch_shc integration (#51443)
Co-authored-by: Artem Draft <Drafteed@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-18 14:00:01 +01:00
Robert Hillis 14adcbc07c
Add tests for goalzero (#59446)
* Add tests for goalzero

* tweak

* tweak
2021-11-16 07:18:30 -08:00
Khole e9c8de25df
Add Hive Alarm Support (#59670)
* Add alarm support

* Update code coverage

* Update homeassistant/components/hive/alarm_control_panel.py

Co-authored-by: Allen Porter <allen.porter@gmail.com>

* Add alarm support

* Update code coverage

* Update homeassistant/components/hive/alarm_control_panel.py

Co-authored-by: Allen Porter <allen.porter@gmail.com>

* Update icon and device info

Co-authored-by: Allen Porter <allen.porter@gmail.com>
2021-11-16 07:18:09 -08:00
Franck Nijhof 458bc92124
Add test coverage to Twente Milieu (#59640) 2021-11-14 11:11:29 +01:00
Sean Dague da8bfed793
Remove mychevy component (#59629) 2021-11-14 11:09:32 +01:00
Franck Nijhof 28a0ba4df3
Modernize/Simplify Twente Milieu (#59632) 2021-11-13 15:34:09 +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
Jonathan Keljo a079b4fd58
Add tests to bring greeneye_monitor to 99% coverage (#58661)
* Bring greeneye_monitor to 99% coverage.

* Pass monitor into listeners on Monitors

* Updates for changes in `dev`, create mock monitor

* Remove logging left in after debugging

* Remove xfails now that #58764 has merged
2021-11-11 13:20:16 +01:00
Robert Hillis 4c2bf428d6
Revert "Add tests for goalzero" (#59407) 2021-11-09 12:01:12 +01:00
lambtho 5418e76c84
IOTA removal (#59380) 2021-11-09 10:40:28 +01:00
Robert Hillis cc872b4618
Add tests for goalzero (#57008)
* Add tests for goalzero

* clean up
2021-11-08 21:29:25 -08:00
Tim Rightnour 5ac55b3443
Add binary_sensor to venstar to track alerts (#58831)
* Add binary_sensor to venstar to track alerts

* Add binary_sensor.py to coveragerc

* Apply suggestions from code review by alengwenus

Co-authored-by: Andre Lengwenus <alengwenus@gmail.com>

* Fixup black any mypy complaints

* Yank the typing, it makes everything complain

Co-authored-by: Andre Lengwenus <alengwenus@gmail.com>
2021-11-05 12:00:57 +01:00
Aaron Bach f7dea3aa1d
Add Ridwell integration (#57590) 2021-10-30 08:27:48 -06:00
L-I-Am 3727fb5288
Broadlink Integration add support for LB1 (#50953)
Co-authored-by: Felipe Martins Diel <41558831+felipediel@users.noreply.github.com>
2021-10-26 21:20:11 -05:00
Yuval Aboulafia 4db743d01f
Remove Huawei Router (ADR-0004) (#57136) 2021-10-26 20:32:22 +02:00
Joakim Plate 6b1b8c9880
Fjaraskupan number entity for periodic venting (#58179) 2021-10-26 10:53:13 -05: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
Patrik Lindgren c950f1ccfa
Initial support for Tradfri STARKVIND Air purifier (#58295)
* Initial commit

* Update homeassistant/components/tradfri/const.py

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

* Feedback

* Updates

* Remove logger

* Fix codestring

* Update homeassistant/components/tradfri/fan.py

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

* Update homeassistant/components/tradfri/fan.py

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

* Update homeassistant/components/tradfri/fan.py

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

* Percent value

* Add tests

* Typo

* Update tests

* Fix util function

* Update homeassistant/components/tradfri/fan.py

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

* Update after review

* Review

* Coverage

* Fix test

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-25 08:15:46 +02:00
Daniel Hjelseth Høyer 26f0ea4a24
OpenGarage binary sensor (#58030)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-23 10:53:49 -10:00
Sören b0b49c611e
Nello removal (#57926) 2021-10-22 21:40:39 +02:00
Franck Nijhof b413f7434f
Add support for min/max dimmer brightness in Tuya (#58165) 2021-10-22 20:28:16 +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 749258a05d
Add climate platform to lookin (#58175)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-10-21 12:00:48 -10:00
ANMalko 626bd25129
Add LOOKin integration (#58125)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-10-21 07:10:23 -10:00
J. Nick Koston 20c35e6032
Move Screenlogic lights to the light platform (#55467)
Co-authored-by: Kevin Worrel <37058192+dieselrabbit@users.noreply.github.com>
2021-10-20 12:38:21 -10:00
jan iversen f2a5d92e61
Fix connect_fail test and modbus.py 100% coverage (#57894)
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2021-10-20 15:22:24 -07:00
jan iversen 45983b5edf
Activate tradfri in coverage and clean conftest for tradfri (#58058) 2021-10-20 13:36:02 +02:00
Franck Nijhof fbe3ce1bf7
Add cover platform to Tuya (#58045) 2021-10-19 19:36:15 +02:00
Franck Nijhof d8a354fa8f
Add humidifier platform to Tuya (#58025) 2021-10-19 12:10:05 +02:00
Daniel Hjelseth Høyer a3cae17d88
Open garage sensor (#57976) 2021-10-19 09:05:55 +02:00
Robert Hillis 4625a05706
Add init tests for agent dvr (#57022)
* Add init tests for agent dvr

* ci
2021-10-19 08:53:30 +02:00
Franck Nijhof 174eaefe61
Add vacuum platform to Tuya (#57996) 2021-10-18 23:30:26 +02:00
Franck Nijhof d64f210b67
Add camera platform to Tuya (#57865) 2021-10-16 14:57:30 -07:00
Franck Nijhof 6e5d49144a
Add siren platform to Tuya (#57780) 2021-10-15 22:28:14 +02:00
Martin Hjelmare 31ccaac865
Add vlc telnet config flow (#57513) 2021-10-15 11:46:58 -07:00
Franck Nijhof 0407a56fdf
Add number platform to Tuya (#57672) 2021-10-14 13:15:41 -07:00
Franck Nijhof cef34356e2
Add sensor platform to Tuya (#57668) 2021-10-14 12:04:02 -07:00
Franck Nijhof fdc6d9e004
Add select platform to Tuya (#57674) 2021-10-14 09:50:51 -07:00
Franck Nijhof b28062789f
Remove deprecated Lyft integration (#57638) 2021-10-14 11:27:09 +02:00
ollo69 827501659c
Nut: Use coordinator data, code cleanup and add test coverage (#57643) 2021-10-13 16:05:06 -10:00
Franck Nijhof 45f3eb6991
Remove deprecated Wink integration (#57634) 2021-10-14 00:20:13 +02:00
Franck Nijhof b2cef78d90
Add binary sensor platform to Tuya (#57623) 2021-10-13 22:12:07 +02:00
jan iversen 2734ae17f3
Modbus baseplatform.py and Validators.py 100% coverage (activate coverage) (#57546) 2021-10-13 11:51:51 -07:00
RenierM26 48c2cfa6f8
Use entity description for Ezviz sensors (#56634) 2021-10-11 20:09:19 +02: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
Marc Mueller 858739949b
Use EntityDescription - openweathermap (#56888) 2021-10-11 16:18:18 +02:00
jan iversen 199cf649be
Add test of lazy_error in modbus (#57170) 2021-10-11 12:43:05 +02:00
Franck Nijhof 82160fa350
Add config flow to Stookalert (#57119) 2021-10-08 11:34:22 +02:00
Kevin Hellemun dc5e4392ae
Refactor Xiaomi vacuum to sensors (#54990)
* Refactor Xiaomi vacuum with sensors.

This is the first step into refactoring xiaomi vacuum attributes into sensors.
What is missing are some switches and binary sensors etc.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Use generic sensor for Xiaomi vacuum sensors.

By using HA coordinator, the generic Xiaomi sensor class can be used with these
coordinators to get the status sensors from vacuum. This also means now that
sensors are available as soon as HA starts, which is a nice plus.

Now the only reason to create a subclass of the generic sensors is when custom
value parsing needs to be done.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Working vacuum sensors via 1 coordinator.

Vacuum needs a custom coordinator to ensure that it fetches all the needed data
and puts it in a dict. From this dict the sensors will then get their data
accordingly.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Remove vacuum setup method in sensor

Sensor is generic enough that vacuum does not require its own setup method.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Don't auto register generic sensors.

Let the user decide which sensor is useful for them and enable them.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Remove converted attributes from xiaomi vacuum.

The attributes that have been converted so far should be removed from the vacuum
attributes list.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Fetch data from vacuum sequentially.

It seems some vacuums do not like parallel requests. The requests that came
before are ignored.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Refactor vacuum sensors to its own container.

By moving vacuum sensors to its own container, there is no more key collisions.
This in turns means that there is need for the split hack to ensure key names
are correct.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* fixup! fix bad rebase.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Fix sensor naming and default registration.

Use proper names for sensors, no need to include from which device status it
came.

Registration of the sensor by default has been parameterised. If the param is
not set, the sensor is not registered.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Make vacuum platform also use coordinator for its data.

By using the coordinator for data in vacuum platfrom, removes the cases where
request gets ignored during the case where the requests are done concurrently by
separate platforms.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Add binary sensor for vacuum

Add binary sensor for waterbox, mop, and water shortage.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Added proper icons to sensors.

https://github.com/home-assistant/core/issues/51361

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Refactor sensors to use dataclass.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Make vacuum use coordinator for its data.

This commit also insures that the binary sensors are only registered for devices
that include a mop.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Apply suggestions from code review

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

* Minor refactoring

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Update data from coordinator after running command.

This is is to have a faster status change when executing a command like changing
fan speeds. If a manual refresh is not triggered. Worst case scenario it will
take 10s for the new fan speed to be reported in HA.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Refresh within coroutine is ok.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Move logging to _handle_coordinator_update

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Use internal state attribute.

Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>

* Fix vacuum typing

* Fix tests constants

* Fix vacuum inconsistent return values

* Fix vacuum state update

* Fix vacuum tests

* Remove impossible cases

* Parametrize custom services test

* Move goto test

* Move clean segment test

* Move clean single segment test

* Test service pause

* Include vacuum in coverage

* Delint

* Fix vacuum sensor dict collision.

This also prevents collision for unique id. As the key is used to construct
unique ids.

* Use f strings as dict keys

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 18:30:17 +02:00
Sylvia van Os dc6f6b7f68
Remove Essent integration (#56991) 2021-10-04 13:31:40 +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
Oliver Ou d3b1ccb668
Tuya v2 Integration Release (#56820)
Co-authored-by: 乾启 <18442047+tsutsuku@users.noreply.github.com>
Co-authored-by: dengweijun <dengweijunben@gmail.com>
Co-authored-by: dengweijun <mengzi.deng@tuya.com>
Co-authored-by: erchuan <jie.zheng@tuya.com>
Co-authored-by: erchuan <erchuan365@outlook.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-09-30 12:02:56 +02:00
Maciej Bieniek 0463007050
Add switch platform to Tractive integration (#55517) 2021-09-29 21:06:11 +02:00
Daniel Hjelseth Høyer d5c3d234ec
Open garage, add config flow (#55290) 2021-09-29 09:43:51 -06:00
Maciej Bieniek 2581a3a735
Add binary sensor platform to Tractive integration (#56635)
* Add binary sensor platform

* Update .coveragerc file

* Create battery charging sensor only if tracker supports it

* Improve async_setup_entry

* Add TRAXL1 model
2021-09-28 09:56:06 +02: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
Teemu R b40d229369
Rework TPLink integration to use python-kasa (#56701)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Teemu R. <tpr@iki.fi>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-27 14:11:55 -05:00
RenierM26 915afedcfc
Add binary_sensor to switchbot (#56415)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-23 17:10:34 -05:00
Milan Meulemans 0b53f73fe2
Convert Nanoleaf integration to use Async library aionanoleaf (#56548) 2021-09-23 15:37:37 -05:00
RenierM26 972db29c88
Add sensor to switchbot platform (#56416)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-23 15:27:34 -05:00
Daniel Hjelseth Høyer 6e7bc65e2e
Airthings (#56578) 2021-09-23 13:20:30 -07:00
Daniel Hjelseth Høyer a94514b00d
Add Surepetcare entity class (#56430) 2021-09-23 13:19:46 -07:00
RenierM26 26e9590927
Add cover platform to switchbot (#56414)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-21 12:35:47 -05:00
Aaron Bach aabc8cd2d5
Add WattTime integration (#56149) 2021-09-20 21:10:24 -07:00
Milan Meulemans d76163e5be
Add tests for Rituals Perfume Genie number, select and binary_sensor platforms (#55224) 2021-09-19 08:51:57 -10: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
Shulyaka ddfe94187e
generic_hygrostat: enable tests (#56193) 2021-09-15 07:55:43 +02:00
Ricardo Steijn 2a51bb5bba
Add Crownstone integration (#50677) 2021-09-14 09:46:52 -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
Steven Looman 73260c5b88
Move parts of ssdp to async_upnp_client (#55540)
* Move parts of ssdp to async_upnp_client

* Fix test for environments with multiple sources

* Fix sonos tests

* More fixes/changes

* More fixes

* Use async_upnp_client==0.21.0

* Pylint/test fixes

* More changes after review

* Fix tests

* Improve testing

* Fix mypy

* Fix yamaha_musiccast tests?

* Changes after review

* Pylint

* Reduce calls to combined_headers

* Update to async_upnp_client==0.21.1

* Update to async_upnp_client==0.21.2

* use as_dict

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-11 13:38:16 -10:00
Erik Montnemery 3af4b2639b
Exclude @overload from coverage (#56021) 2021-09-09 21:24:23 +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
Fuzzy efafe82799
Remove Trackr integration (API removed) (#55917)
* Delete Trackr component directory

* Update .coverage.rc to remove Trackr

* Update requirements_all.txt
2021-09-08 05:01:58 +02:00
Joakim Sørensen 470aa7e871
Add data update coordinator to the Tautulli integration (#54706)
* Add data update coordinator to the Tautulli integration

* update .coveragerc

* Add guard for UpdateFailed

* Apply suggestions from code review

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* ignore issues

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2021-08-27 20:39:12 -05:00
Milan Meulemans d4b506e5e4
Add tests for Rituals init, sensor and switch (#52406) 2021-08-25 12:25:39 -05:00
Aaron Bach 6bc5c1c9af
Finish EntityDescription implementation for RainMachine (#55180) 2021-08-25 08:36:25 -06: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
jan iversen 0ab99fc8bf
Activate mypy for surepetcare (#55079) 2021-08-24 11:21:57 +02:00
Maciej Bieniek 09b872d51f
Add `sensor` platform for Tractive integration (#54143)
* Add sensor platform

* Add extra_state_attributes

* Add more constants

* Add sensor.py to .coveragerc file

* Use native value

* Suggested change

* Move SENSOR_TYPES to sensor platform

* Add domain as prefix to the signal

* Use TractiveEntity class

* Add model.py to .coveragerc file

* Clean up files

* Add entity_class attribute to TractiveSensorEntityDescription class

* TractiveEntity inherits from Entity

* Suggested change

* Define _attr_icon as class attribute

Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>
2021-08-24 00:20:28 +02:00
Robert Hillis e5d6e18e30
Complete config flow tests for sense (#55040) 2021-08-23 07:58:42 +02:00
jan iversen 33f660118f
Add lazy_error_count to modbus (#54412)
* Add lazy_error_count.

* Use -=

* Review comments.
2021-08-21 15:49:50 +02:00
Joakim Plate 4bdeba8631
Add fjäråskupan sensor (#54921)
* Add fjäråskupan sensor

* Update homeassistant/components/fjaraskupan/sensor.py

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

* Type the return value of constructor

* Update __init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-21 11:09:23 +02:00
Joakim Plate 5142ebfcc2
Add fjäråskupan light entity (#54918)
* Add fjäråskupan light

* Update homeassistant/components/fjaraskupan/light.py

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

* Check property

* Switch to default coordinator update

* Type check constructor

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-21 09:34:32 +02:00
Joakim Plate dd8542e01f
Add fjäråskupan binary_sensor (#54920)
* Add fjäråskupan binary_sensor

* Switch to entity description

* Type check constructor
2021-08-20 20:18:30 +02: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
Paulus Schoutsen f1a4ba8bb0
Add Rainforest Eagle tests and price (#54887) 2021-08-19 13:19:31 -07: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
jan iversen 69bc6bbe48
Activate mypy for google_pubsub (#54649) 2021-08-17 10:10:56 +02:00
J. Nick Koston 5e51f57f02
Convert nmap_tracker to be a config flow (#54715) 2021-08-16 15:19:32 -05:00
ehendrix23 f40c672cd2
Add light platform to MyQ (#54611)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-08-16 14:52:53 -05:00
ehendrix23 c040be423a
Updates to bump MyQ to 3.1.2 (#54488) 2021-08-11 22:17:25 -05:00
Martin Hjelmare 028a3d3e53
Complete mysensors sensor coverage (#54471) 2021-08-11 17:19:02 +02:00
Joakim Sørensen d1ea38e8f0
Add 100% test coverage for Uptime Robot (#54314)
* Add 100% test coverage for Uptime Robot

* Update tests/components/uptimerobot/test_binary_sensor.py

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

* Add more typehints

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-10 16:29:51 +02:00
Maciej Bieniek 4459d8674a
Add `binary_sensor` platform for Xiaomi Miio integration (#54096) 2021-08-09 23:56:33 +02:00
Simone Chemelli e0bc911e24
Fix Neato reauth flow when token expired (#52843)
* Fix Neato reauth flow when token expired

* Change and simplify approach

* Missing file

* Cleanup

* Update unique_id

* Added missing lamda

* Unique_id reworked

* Guard for id future ID changes

* Bump pybotvac: provide unique_id

* Address review comment

* Fix update check

* Remove token check

* Trigger reauth only for 401 and 403 code response

* Review comments
2021-08-07 12:22:08 +02:00
Joakim Sørensen 786a83f844
Add unique_id to Uptime Robot config_flow (#54055) 2021-08-05 14:58:29 +02: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
Aidan Timson 18f4d125c3
System Bridge v2.3.0+ - Data from WebSocket (#53443)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-02 22:11:26 +02:00
Martin Hjelmare 007ecc51e5
Revert "Add Automate Pulse Hub v2 support (#39501)" (#53704) 2021-07-29 11:58:48 -07:00
Jan Bouwhuis 781015fb19
Xiaomi_Miio Humidifier rework (#52366)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com>
Co-authored-by: Teemu R. <tpr@iki.fi>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-07-28 10:52:43 +02:00
Kuzj d0b9d82287
Refactor bme280, add SPI support (#48775)
* bme280 refactoring, add SPI support

* isort, requirements

* __init_.py add to .coveragerc

* Re-run CI jobs

* const.py to .coveragerc

* Add support for IoT class in manifest

* Keepalive

* review suggestions

* scan_interval with coordinator

* black, isort

* coordinator review suggestions

* Set device_class

* review suggestions

* review suggestions

* review suggestions

* review suggestions

* review suggestions

* review suggestions

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

* add bme280spi to commented requirements

* run script.gen_requirements_all

* black

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-07-27 16:29:43 -04: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
Jesse Hills 18bf0762b5
Add select entities to ESPHome (#53526)
Co-authored-by: Otto Winter <otto@otto-winter.com>
2021-07-27 11:45:04 +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
Rami Mosleh 1a450c2084
Speedtestdotnet code cleanup and type hints (#52533) 2021-07-22 12:25:54 +02:00
Robert Hillis a1df3519db
Use entity class attributes for Bsblan (#53165) 2021-07-21 19:37:12 +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 8a72e8df79
Convert Mill consumption attributes to sensors (#52311) 2021-07-20 22:41:08 -07: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
Robert Hillis 7b27725ec1
Cleanup redundant coveragerc entries (#53171) 2021-07-19 12:00:38 +02:00
Robert Hillis 6b97a5ba8e
Fix hisense_aehw4a1 test exclusion (#53084)
* Fix hisense_aehw4a1 test coverage

* add back __init__

* remove from hassfest

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2021-07-18 19:17:36 -05:00
Robert Hillis 284e13464d
Fix home plus control coverage (#53087)
* Fix home_plus_control test coverage

* add back api, switch
2021-07-18 14:56:54 -05:00
Robert Hillis fe22d5a675
Fix home_connect test coverage (#53086)
* Fix home_connect test coverage

* remove from hassfest exclusions
2021-07-18 14:54:43 -05:00
Robert Hillis 7d52c30e36
Revert "Fix google test coverage (#53060)" (#53085)
This reverts commit 4075e83732.
2021-07-16 07:13:34 -04:00
Robert Hillis 4075e83732
Fix google test coverage (#53060) 2021-07-15 20:56:57 -07:00
jan iversen 12ac666459
only allow one active call in each platform. (#52823) 2021-07-13 21:45:42 +02:00
Robert Hillis 3d419d1e8a
Fix flume converagerc (#52975) 2021-07-13 19:32:55 +02:00
Shulyaka e9948100a7
Add generic hygrostat integration (#36759)
* generic_hygrostat: new integration
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: jan Iversen <jancasacondor@gmail.com>
2021-07-13 13:25:29 +02:00
J. Nick Koston e6ea9f4708
Fix nexia thermostats humidify without dehumidify support (#52758) 2021-07-12 21:39:51 +02:00
jan iversen 2ecfd74fa4
Add more data_types to modbus (#52423)
* Add more data_types.

* Use new struct when writing temperature.
2021-07-12 07:58:45 +02:00
jan iversen fe1f7ba316
Add check for _client existence in modbus (#52719) 2021-07-08 11:58:51 +02: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
Aaron Bach 5ce4de7bbb
Migrate AirVisual `air_quality` platform to `sensor` platform (#52349)
* Migrate AirVisual air_quality platform sensors

* Remove redundancy

* Cleanup

* Properly set available

* Unwind config_entry -> entry name change

* More unwinding

* Rename

* Update homeassistant/components/airvisual/sensor.py

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

* Code review

* Linting

Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-04 12:16:06 -06:00
Simone Chemelli 69b9a9c4ee
Merge fritzbox_netmonitor integration into fritz (#52264)
* Merge netmonitor integration

* cleanup additional files

* Use attrs instead of properties

* Add state_class to relevant sensors

* Update homeassistant/components/fritz/sensor.py

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

* Update homeassistant/components/fritz/sensor.py

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

* Update homeassistant/components/fritz/sensor.py

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

* Update homeassistant/components/fritz/sensor.py

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

* Update homeassistant/components/fritz/sensor.py

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

* Update homeassistant/components/fritz/sensor.py

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

* mypy fix + small cleanup

* Round, GB and icons

* Update homeassistant/components/fritz/sensor.py

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

* remove state_class from no-reset counters

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-07-03 16:26:43 +03:00
Robert Hillis 5cd4471c67
Add sensor platform to goalzero (#49835)
* Add sensor platform to goalzero

* Tweak

* Remove unused DATA_SCHEMA

* Simplify

* Remove last_reset

* Update on reload
2021-07-02 17:43:37 +02:00
Simone Chemelli 7959225fef
Add switch platform to Fritz (#51610)
* Add switch platform to Fritz

* Fix tests

* Pylint

* Small fix

* Bump fritzprofiles to fix log level and identifier

* Fix different WiFi networks with same name

* Changed exposed attributes

* Moved to extra_state

* Remove redundant lambda

* Add missing wait

* Removed identifiers

* Update homeassistant/components/fritz/switch.py

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

* Update homeassistant/components/fritz/switch.py

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

* Add mapping dict

* Device Profile disabled by default

* Heavy cleanup

* Tweak

* Bug fix

* Update homeassistant/components/fritz/switch.py

Co-authored-by: Aaron David Schneider <aaron.schneider@nbi.ku.dk>

* Fix port forward switching + small log improvement

* Cleanup from old approach

* Handle port mapping hot removal (from device)

* Minor fixes

* Typying

* Removed lambda call

* Last missing strict typing

* Split get entities

* Func rename

* Move FritzBoxBaseSwitch to switch.py

* Removed lambda

* Update homeassistant/components/fritz/common.py

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

* Update homeassistant/components/fritz/common.py

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

* Update homeassistant/components/fritz/switch.py

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

* Update homeassistant/components/fritz/switch.py

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

* Update homeassistant/components/fritz/switch.py

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

* Update homeassistant/components/fritz/switch.py

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

* Fixes after applying comments

* Remvoed redundant try block

* Removed broad-except

* Optimized async/sync switch

* Update homeassistant/components/fritz/switch.py

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

* Update homeassistant/components/fritz/switch.py

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

* Update homeassistant/components/fritz/switch.py

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

* Address remaining comments

* Optimize return list

* More optimization for return lists

* Some missing strict typing

* Redundant typing

* Update homeassistant/components/fritz/switch.py

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

* Wrong if

* Introduce const for profile status

* Update homeassistant/components/fritz/switch.py

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

* Update homeassistant/components/fritz/switch.py

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

* Fix mypy

* Switch back to get_local_ip()

* Address latest comments

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Aaron David Schneider <aaron.schneider@nbi.ku.dk>
2021-06-29 11:57:34 -04:00
Jesse Hills e1797ea670
Add number entities to ESPHome (#52241)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-29 14:33:04 +02:00
Adrián Moreno a639cb7ba7
Add sensor platform to Meteoclimatic integration (#51467)
* Add meteoclimatic sensor platform

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>

* Add sensor.py to coverage file

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>

* Add explicit return type None

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>

* Fix sample station code

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>

* Apply frenck suggestions

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>

* Remove extra attributes

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>

* Revert translations

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>

* Remove None icons and classes

Signed-off-by: Adrian Moreno <adrian@morenomartinez.com>
2021-06-29 13:52:39 +02:00
Milan Meulemans 6f41168616
Change DiffuserRoomSize number entity to select entity (#51993)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-06-28 20:20:32 +02:00
Andre Lengwenus f2fe6c26ab
Add tests for LCN integration setup (#48070) 2021-06-28 18:08:09 +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
Shay Levy 5795e76826
Migrate Switcher entity attributes to sensors (#51964)
* Migrate attributes to sensors

Migrate attributes to sensors

* Fix pylint

* Apply suggestions from code review

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

* Add typing imports

Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-22 18:28:09 +02:00
Artem Draft db61a773fd
Add remote control platform to BraviaTV (#50845) 2021-06-17 12:33:44 +02:00
Tom Schneider 7e1fec8ee4
Rewrite of Yamaha musiccast integration (#51561)
* Initial commit for new musiccast integration

* Add zone support

* Get/set volume level

* Remove volume step

* Create custom MusicCastData type

* Create MusicCastDevice

* Fix await

* Add power and mute control

* Implement all basic media_player parts

* Support input switching

* Add duration/position support

* Add advanced tuner functions

* Basic media browser

* Add layer in media browser to see all available list_infos

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

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

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

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

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

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

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

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

* Removed some debug prints

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

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

* Updated manifest of yamaha musiccast

* Update library

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

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

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

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

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

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

* Remove print statements

* Fix sleep timer service call

* Fix yamllint error

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

* Add __init__.py to .coveragerc

* Apply suggestions from code review

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

* Implement suggestions from code review

* Improve identifiers and connections, remove event loop parameter

* Add coordinator back

* Better exception handling

* Fix unique id in ssdp step

* Remove abc.ABC from MusicCasteDeviceEntity

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

* Update homeassistant/components/yamaha_musiccast/config_flow.py

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

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

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

* add coordinator to the super call of the mediaplayer

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

* add the coordinator to the init function of the MusicCastEntity

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

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

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

* merged _handle_config_flow into async_step_user

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

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

* Fixed the test for the config flow.

* Use async_write_ha_state instead of schedule_update_ha_state.

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

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

* Update tests/components/yamaha_musiccast/test_config_flow.py

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

* Added a fixture to avoid IO in the test_user_input_device_not_found test

* Use absolute imprt to import data_entry_flow.

* Use local vars for host and serial_number in async_step_user.

* Remove ip_address and zone_id properties.

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

* Removed entry_id from the MusicCastEntity init function.

* Updated strings and English translation.

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

* Implemented legacy configuration.yaml support for existing configurations.

* Added tests for the newly added config flow step.

* Use device_id as identifier

* Fix an accidentally relative import

* Fix pylint warnings

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

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

* Use CONF_HOST instead of 'host'

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

* Update homeassistant/components/yamaha_musiccast/media_player.py

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

* Readded PLATFORM_SCHEMA for configuration.yaml

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

* Bump aiomusiccast to 0.6 to support asyncio sockets

Co-authored-by: Michael Harbarth <michael.harbarth@gmx.de>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-14 08:58:42 +02:00
Brent Petit 5cc31a98e2
Add Ecobee humidifier device_info and unique_id (#51504)
* Add Ecobee humidifier device_info and unique_id

Ecobee humidifier entity was not connected to the thermostat device.
This change will ensure the entitiy is properly connected.

This change also fills out the ecobee-data.json fixutre data a bit
to address failures in the test setup.

* Add Ecobee humidifier device_info and unique_id

Adjust test fixture data to increase pytest coverage
Clean up indenting in ecobee-data.json

* Add Ecobee humidifier device_info and unique_id

Update exception case in device_info to not
be included in codecov tests. This case has
been tested locally.

* Add Ecobee humidifier device_info and unique_id

Address pylint issue

* Add Ecobee humidifier device_info and unique_id

Remove no cover pragma and add ecobee humidifier.py to
.coveragerc
2021-06-11 17:39:57 +02:00
Franck Nijhof e5c6ac5ba8
Add 100% test coverage to Ambee integration (#51670)
* Add 100% test coverage to Ambee integration

* Add tests for device and entity registry
2021-06-09 20:23:16 +02:00
Franck Nijhof d021e593d3
Add Ambee integration (#51645) 2021-06-09 13:22:37 +02:00
Milan Meulemans d0a8e27036
Add Rituals number platform (#49723) 2021-06-08 03:28:31 +02:00
J. Nick Koston ccf4b5a265
Move remaining code out of netdisco to eliminate as SSDP dependency (#51588) 2021-06-07 22:12:33 +02:00
Thomas Schamm ffe8b3e49b
Add bosch shc platforms for sensor devices (#50720) 2021-06-03 14:39:42 +02:00
Eduard van Valkenburg e8762bdea1
Add binary sensor platform to SIA integration (#51206)
* add support for binary_sensor

* added default enabled for binary sensors

* fixed coverage and a import deleted

* disable pylint for line

* Apply suggestions from code review

* split binary sensor and used more attr fields

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-06-03 08:39:44 +02:00
Guido Schmitz 3de29a7606
Add binary_sensor tests for devolo Home Control (#49843)
Co-authored-by: Markus Bong <Markus.Bong@devolo.de>
2021-06-02 13:59:35 +02:00