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
Maikel Punie
7f049c5b20
Add the Duotecno intergration (#96399)
Co-authored-by: Isak Nyberg <36712644+IsakNyberg@users.noreply.github.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-25 11:16:00 +02:00
Michael Arthur
6ef7c5ece6
Add electric kiwi integration (#81149)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-25 10:46:53 +02:00
Joakim Plate
f7ce9b1688
Add support for gardena bluetooth (#95179)
Add support for gardena bluetooth based water computers.
2023-07-12 16:08:15 +02:00
tronikos
caaeb28cbb
Add Opower integration for getting electricity/gas usage and cost for many utilities (#90489)
* Create Opower integration

* fix tests

* Update config_flow.py

* Update coordinator.py

* Update sensor.py

* Update sensor.py

* Update coordinator.py

* Bump opower==0.0.4

* Ignore errors for "recent" PGE accounts

* Add type for forecasts

* Bump opower to 0.0.5

* Bump opower to 0.0.6

* Bump opower to 0.0.7

* Update requirements_all.txt

* Update requirements_test_all.txt

* Update coordinator

Fix exception caused by https://github.com/home-assistant/core/pull/92095
{} is dict but the function expects a set so change it to set()

* Improve exceptions handling

* Bump opower==0.0.9

* Bump opower to 0.0.10

* Bump opower to 0.0.11

* fix issue when integration hasn't run for 30 days

use last stat time instead of now when fetching recent usage/cost

* Allow username to be changed in reauth

* Don't allow changing  username in reauth flow
2023-07-02 21:26:31 -04:00
Joost Lekkerkerker
4ac92d755e
Add config flow for zodiac (#95447)
* Add config flow for zodiac

* Add config flow for zodiac

* Fix feedback
2023-06-30 12:58:07 +02:00
cpolhout
cfb133d431
Add new integration Loqed (#70080) 2023-06-28 09:42:12 +02:00
disforw
7c676c0a7d
Add config_flow to QNAP (#80450)
* Create config_flow.py

* Update __init__.py

* Create const.py

* Create strings.json

* Update sensor.py

* Update manifest.json

* Update manifest.json

* Add device name to entities

* Correcting health sensor

* Update manifest.json

* Adding integration_type

* Update sensor.py

* Update __init__.py

* Enums

* Update sensor.py

* Removed unused notify_create

* Switch to SensorDeviceClass.TEMPERATURE

* Update enums

* Remove SENSOR_TYPES from const.py

* Add SENSOR_TYPES to sensor.py

* Removed dependancies

* Removed import yaml

* Removed entity_registry_enabled_default

* Update const.py remove dups

* Update manifest.json removed dups

* Update __init__.py

* Update const.py

* Update manifest.json

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py remove unused

* Update sensor.py add docstring

* Update sensor.py add super

* Remove FOLDER sensors

* Remove VOLUME_NAME

* fix cli

* fix cli

* Add config flow tests

* Update requirements_test_all.txt

* Update CODEOWNERS

* Update homeassistant/components/qnap/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update __init__.py

Change unload to walrus
Remove async_setup

* Update const.py remove PLATFORMS

* Update __init__.py add Platform Enum

As per epenet

* Update __init__.py

* Update config_flow.py

* Update sensor.py

* Update __init__.py

ruff

* Update config_flow.py

Ruff

* Update sensor.py

* Update const.py remove attrs

* Update sensor.py add attrs

* Revert tuple for sensor extend

* Update sensor.py

* Update coordinator.py

* Update coordinator.py

* Update sensor.py

* Update coordinator.py

* Update homeassistant/components/qnap/__init__.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/const.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/__init__.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update coordinator.py

* Update __init__.py

* Update coordinator.py

* Update sensor.py

* Add device_info

* Update sensor.py

* Update sensor.py self._attr_unique_id

* Update sensor.py

* Update sensor.py

* Type Hints

* Move tuples

* Drive sensor name

* Remove caps

* Remove caps

* Add YAML import

* Update sensor.py fix ruff

* Revert tuples

* Update sensor.py as per review

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* assert uid is not None

* Update homeassistant/components/qnap/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update .coveragerc

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/const.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/const.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update sensor.py

* Update config_flow.py add imports

* Update const.py

* Update sensor.py move confs to const

* Update config_flow.py add const

* Update test_config_flow.py remove const name

* Update test_config_flow.py remove standard result const

* Update test_config_flow.py

* Combine tests

* Update test_config_flow.py

* Update config_flow.py

* Update test_config_flow.py

* Update config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update sensor.py change UID as requested

* Update sensor.py added check for monitor_device

* fix tests

* Remove rounding

* Revert "Remove rounding"

This reverts commit 61bf653c06.

---------

Co-authored-by: starkillerOG <starkiller.og@gmail.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-27 17:42:27 +02:00
J. Nick Koston
878d41a472
Remove senseme integration (#94363) 2023-06-27 14:43:19 +02:00
Barry Williams
57c9aad9b1
Migrate Linn / Openhome integration to SSDP config flow (#94564)
* Migrate Linn / Openhome integration to SSDP config flow

* moved device initialisation into __init__

* wait for user step before adding openhome entities

* add CONFIG_SCHEMA

* cover confirmation step in config flow test

* Address comments

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-21 12:46:17 -04:00
Martin Hjelmare
f9366e5cc7
Migrate google translate to config entries (#93803)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-21 14:58:58 +02:00
jimmyd-be
3d678f5b99
Renson integration (#56374)
* Implemented Renson integration

* -  renamed component to a better name
- Made cleaner code by splitting up files into different one
-  Fixed issues regarding getting data from library
- Added service.yaml file

* Added Renson services

* cleanup translations

* added config_flow tests

* changed config_flow, removed all services

* use SensorEntityDescription + introduced new binarySensor

* fixed config_flow test

* renamed renson_endura_delta to renson

* refactored sensors and implemented binary_sensor

* Changed some sensors to non measurement and added entity_registery_enabled_default for config sensors

* Enabled binary_sensor

* changed import to new renamed module

* Merge files into correct files + cleaned some code

* Change use of EntityDescription

* Update codeowners

* Fixed lint issues

* Fix sensor

* Create test.yml

* Update test.yml

* add github action tests

* Format json files

* Remove deprecated code

* Update homeassistant/components/renson/binary_sensor.py

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

* Use Coordinqte in Sensor

* Migrated binary sensor to use coordinate

* Removed firmwareSensor

* Add entity_catogory to binary_sensor

* Add services

* Revert "Add services"

This reverts commit 028760d8d8.

* update requirements of Renson integration

* Add services and fan

* Fixed some issue + fixed PR comments

* Cleanup code

* Go back 2 years ago to the bare minimum for PR approval

* Refactored code and added a lot of device classes to the entities

* Fix some bugs

* Add unique Id and some device class

* Show the level value for CURRENT_LEVEL_FIELD instead of the raw data

* Remove FILTER_PRESET_FIELD for now

* Make the _attr_unique_id unique

* Changed Renson tests

* Moved Renson hass data into @dataclass

* Changed test + added files to .coveragerc

* Add device_class=SensorDeviceClass.Duration

* Fix syntax

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-10 09:21:33 +02:00
Jan-Philipp Benecke
d8ceb6463e
Add new integration Discovergy (#54280)
* Add discovergy integration

* Capitalize measurement type as it is in uppercase

* Some logging and typing

* Add all-time total production power and check if meter has value before adding it

* Add tests for Discovergy and changing therefor library import

* Disable phase-specific sensor per default, set user_input as default for schema and implement some other suggestions form code review

* Removing translation, fixing import and some more review implementation

* Fixing CI issues

* Check if acces token keys are in dict the correct way

* Implement suggestions after code review

* Correcting property function

* Change state class to STATE_CLASS_TOTAL_INCREASING

* Add reauth workflow for Discovergy

* Bump pydiscovergy

* Implement code review

* Remove _meter from __init__

* Bump pydiscovergy & minor changes

* Add gas meter support

* bump pydiscovergy & error handling

* Add myself to CODEOWNERS for test directory

* Resorting CODEOWNERS

* Implement diagnostics and reduce API use

* Make homeassistant imports absolute

* Exclude diagnostics.py from coverage report

* Add sensors with different keys

* Reformatting files

* Use new naming style

* Refactoring and moving to basic auth for API authentication

* Remove device name form entity name

* Add integration type to discovergy and implement new unit of measurement

* Add system health to discovergy integration

* Use right array key when using an alternative_key & using UnitOfElectricPotential.VOLT

* Add options for precision and update interval to Discovergy

* Remove precision config option and let it handle HA

* Rename precision attribute and remove translation file

* Some formatting tweaks

* Some more tests

* Move sensor names to strings.json

* Redacting title and unique_id as it contains user email address
2023-06-06 13:44:00 -04:00
Paul Frank
c67f32b924
Add config flow to mystrom (#74719)
* rebase

* fixed review comments

* fix test

* Update tests

* increase test coverage

* implement some review comments

* Enhance device check for old FWs and add tests

* Reworked exception handling

* small code optimizations

* fix test

* Increase test coverage

* Update __init__.py

changed from hass.config_entries.async_setup_platforms(entry, PLATFORMS) to await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

* Update __init__.py

remove spaces

* Bump python-mystrom to 2.2.0

* Migrate to get_device_info from python-mystrom

* Migrate to get_device_info from python-mystrom

* Update __init__.py

* update requirements_all.txt

* update config_flow

* fix tests

* Update homeassistant/components/mystrom/__init__.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Implemented review changes

* increase test coverage

* Implemented user defined title

* implemented user defined title

* Additional review comments

* fix test

* fix linter

* fix linter

* Update homeassistant/components/mystrom/models.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* fix review comments

* fix missing import

* simplify

* Update homeassistant/components/mystrom/__init__.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/__init__.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/light.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* fix review comments

* fix review comments

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* fix review comment

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-06 14:16:27 +02:00
Robert Hillis
a1e9cf1c24
Add Dremel 3D Printer integration (#85969)
* Add Dremel 3D Printer integration

* remove validators requirement

* ruff

* uno mas

* uno mas

* uno mas

* uno mas

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Tom Harris <tomharris@harrisnj.net>
2023-05-31 16:55:57 -04:00
Joost Lekkerkerker
e4c51d43f0
Add YouTube integration (#92988)
* Add YouTube stub

* Add YouTube stub

* Add YouTube stub

* Add YouTube stub

* Add Youtube stub

* Add Youtube stub

* Add tests

* Add tests

* Add tests

* Clean up

* Add test for options flow

* Fix feedback

* Fix feedback

* Remove obsolete request

* Catch exceptions

* Parallelize latest video calls

* Apply suggestions from code review

Co-authored-by: Robert Hillis <tkdrob4390@yahoo.com>

* Add youtube to google brands

* Fix feedback

* Fix feedback

* Fix test

* Fix test

* Add unit test for http error

* Update homeassistant/components/youtube/coordinator.py

Co-authored-by: Robert Hillis <tkdrob4390@yahoo.com>

* Fix black

* Fix feedback

* Fix feedback

* Fix tests

---------

Co-authored-by: Robert Hillis <tkdrob4390@yahoo.com>
2023-05-27 11:21:12 -07:00
Joost Lekkerkerker
a96215bf2e
Lastfm config flow (#92299)
* Move constant values to separate file

* Move constant values to separate file

* Add config flow to lastfm

* Add tests

* Add config flow to lastfm

* Add tests

* Add tests

* Add tests

* Add extra form for main user and autofill with friends

* Add extra form for main user and autofill with friends

* Add extra form for main user and autofill with friends

* Add extra form for main user and autofill with friends

* Add OptionsFlow

* Add tests

* Fix feedback

* Fix feedback

* Fix feedback

* Fix feedback

* Fix test

* Apply suggestions from code review

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update config_flow.py

* Update config_flow.py

* Update config_flow.py

* Update homeassistant/components/lastfm/config_flow.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Add tests

* Cleanup

* Update config_flow.py

* Update config_flow.py

* Update config_flow.py

* Fix test

* Fix feedback

* Codeowner lastfm

* Fix feedback

* Fix feedback

* Parametrize errors

* Parametrize errors

* Parametrize errors

* Finish tests

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-05-25 14:48:16 +02:00
Álvaro Fernández Rojas
8edb253ace
Add Airzone Cloud integration (#93238)
* airzone-cloud: add new integration

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Add missing aioairzone-cloud to test requirements

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Update aioairzone-cloud to v0.0.4

Allows to handle TooManyRequests exception on coordinator.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* aioairzone_cloud: reduce API requests

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: remove system_zone_id

As opposed to the Local API of Airzone devices, the Cloud API provides unique
IDs for both systems and zones, so we can remove the system_zone_id copied from
the Local API integration.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: minor improvements

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* tests: airzone_cloud: simplify mock_get_webserver

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Update aioairzone to v0.0.5

- Add token refresh and relogin support.
- Improve fetching installation devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: add to strict typing

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Update aioairzone to v0.0.7

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* trigger CI

* airzone_cloud: remove unneeded api_get_user call

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Add Airzone brand

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Update aioairzone to v0.1.1

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: use unique_id instead of entry_id

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: remove special handling of TooManyRequests

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: bump coordinator timeout to 30s

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: make AirzoneEntity an ABC

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: fix strings typo

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* tests: airzone_cloud: simplify webserver mock

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Update aioairzone-cloud to v0.1.2

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-23 19:22:50 +02:00
Jafar Atili
1935e126bf
Add new integration to control Electra Smart HVAC devices (#70361)
* Added new integration to support Electra Smart (HVAC)

* fixes + option to set scan interval

* renamed the module to electrasmart and added unittests

* added non tested files to .coveragerc

* changed the usage from UpdateCoordinator to each entity updates it self

* small fixes

* increased pypi package version, increased polling timeout to 60 seconds, improved error handling

* PARALLEL_UPDATE=1 to prevent multi access to the API

* code improvements

* aligned with the new HA APIs

* fixes

* fixes

* more

* fixes

* more

* more

* handled re-atuh flow

* fixed test

* removed hvac action

* added shabat mode

* tests: 100% coverage

* ran hassfest

* Update homeassistant/components/electrasmart/manifest.json

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

* Update homeassistant/components/electrasmart/manifest.json

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

* Update homeassistant/components/electrasmart/manifest.json

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

* Update homeassistant/components/electrasmart/climate.py

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

* address Shay's comments

* address Shay's comments

* address more comments

---------

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2023-05-20 13:13:32 +03:00
tronikos
6c56ceead0
Create Google Generative AI Conversation integration (#93156)
* Copy openai_conversation to google_generative_ai_conversation
This is to improve diff of the next commit with the actual implementation.

Commands used:
cp -r homeassistant/components/openai_conversation/ homeassistant/components/google_generative_ai_conversation/
cp -r tests/components/openai_conversation/ tests/components/google_generative_ai_conversation/

find homeassistant/components/google_generative_ai_conversation/ tests/components/google_generative_ai_conversation/ -type f | xargs sed -i \
-e 's@openai_conversation@google_generative_ai_conversation@g' \
-e 's@OpenAI Conversation@Google Generative AI Conversation@g' \
-e 's@balloob@tronikos@g'

* Add google_generative_ai_conversation to Google brand

* Google Generative AI Conversation

* Sync recent openai changes

* handle empty responses
2023-05-16 21:05:56 -04:00
Malte Franken
649557ed2e
Add config flow to geo_json_events (#87062)
* migrated geo_json_events integration to config flow

* improve test coverage

* code reformatting

* fix tests

* fix entity manager

* changes after review

* improve test coverage and fixed form

* remove unused code

* remove commented out code

* changes after review

* make title prettier

* fixed tests

* simplified code

* changes after review

* fix test

* push deprecation out

* changes after review

* changes after review

* changes after review

* changes after review

* changes after review

* removed scan interval from user flow and import flow
2023-05-10 10:28:45 +02:00
andarotajo
bf6d429339
Add config flow to dwd_weather_warnings (#91040)
* Add config flow to dwd_weather_warnings

* Add additional test for more coverage

* Apply code review changes

* Apply further code review changes

* Rename constant for configuration

* Apply code review changes

* Simplify config flow code
2023-05-07 10:26:39 +02:00
Steve Easley
6bbcf2f689
Add JVC Projector integration (#84748)
* Initial commit of jvcprojector

* Renamed domain

* Initial commit

* Support for v1.0.6 device api

* Fixed failing test

* Removed TYPE_CHECKING constant

* Removed jvc brand

* Removed constant rename

* Renaming more constants

* Renaming yet more constants

* Improved config_flow tests

* More changes based on feedback

* Moved config_flow dependency

* Removed default translation title

* Removed translation file

* Order manifest properly
2023-05-05 20:44:53 +02:00
Luke
498e69695b
Add Anova integration (#86254)
* init setup of Anova Sous Vide

* bump anova-wifi to 0.2.4

* Removed yaml support

* Bump to anova-wifi 0.2.5

* Added support for adding sous vide while offline

* Added basic test for sensor

* added better tests for sensors and init

* expanded code coverage

* Decreased timedelta to lowest functioning value.

* Updating my username

* migrate to async_forward_entry_setups

* applying pr recommended changes

* bump anova-wifi to 0.2.7

* Improvements to hopefully get this review ready

* formatting changes

* clean ups for pr review

* remove unneeded unique id check.

* bump ao anova_wifi 0.3.0

* rename device_id to device_unique_id

* renamed to 'anova'

* added unique_id to MockConfigEntry

* removed leftover anova sous vides

* added device id to strings

* added error for incorrect device id

* add has_entity_name

* added attr name for tests

* added authentication functionality

* bump to 0.4.3

* split entity into its own class/object

* pulling firmware version out of async_setup

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

* addressed pr changes

* fixed pytest

* added anova data model

* removed unneeded time change

* add logging in package

* rework step_user

* Update homeassistant/components/anova/sensor.py

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

* Removed lower from attr unique id

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

* Removed unneeded member variables in sensor

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

* removed repeated subclass attr

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

* simplify update_failed test

* created descriptionentity

* bump to 0.6.1 limit ws connect

* add translation for sensor entities

* version bump - support pro model

* add anova to strict typing

* fixed sensor not getting datas type

* Apply suggestions from code review

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

* Check for new devices in init

* style changes

* return false instead of config entry not ready

* move serialize_device_list to utils

* move repeating device check into api

* moved unneeded code out of try except

* fixed tests to get 100% cov

* Update homeassistant/components/anova/strings.json

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

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-22 18:05:14 -05:00
Luke
b4e0a1f1fc
Add new Roborock Integration (#89456)
* init roborock commit

* init commit of roborock

* removed some non-vacuum related code

* removed some non-needed constants

* removed translations

* removed options flow

* removed manual control

* remove password login

* removed go-to

* removed unneeded function and improved device_stat

* removed utils as it is unused

* typing changes in vacuum.py

* fixed test patch paths

* removed unneeded records

* removing unneeded code in tests

* remove password from strings

* removed maps in code

* changed const, reworked functions

* remove menu

* fixed tests

* 100% code coverage config_flow

* small changes

* removed unneeded patch

* bump to 0.1.7

* removed services

* removed extra functions and mop

* add () to configEntryNotReady

* moved coordinator into seperate file

* update roborock testing

* removed stale options code

* normalize username for unique id

* removed unneeded variables

* fixed linter problems

* removed stale comment

* additional pr changes

* simplify config_flow

* fix config flow test

* Apply suggestions from code review

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

* First pass at resolving PR comments

* reworked config flow

* moving vacuum attr

* attempt to clean up conflig flow more

* update package and use offline functionality

* Fixed errors and fan bug

* rework model and some other small changes

* bump version

* used default factory

* moved some client creation into coord

* fixed patch

* Update homeassistant/components/roborock/coordinator.py

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

* moved async functions into gather

* reworked gathers

* removed random line

* error catch if networking doesn't exist or timeout

* bump to 0.6.5

* fixed mocked data reference url

* change checking if we have no network information

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

---------

Co-authored-by: Allen Porter <allen.porter@gmail.com>
Co-authored-by: Allen Porter <allen@thebends.org>
2023-04-20 07:02:58 -07:00
Michael Hansen
85d57a046c
Add wyoming integration with stt (#91579)
* Add wyoming integration with stt/tts

* Forward config entry setup

* Use SpeechToTextEntity

* Add strings to config flow

* Move connection into config flow

* Add tests

* On load/unload used platforms

* Tweaks

* Add unload test

* Fix stt

* Add missing file

* Add test for no services

* Improve coverage

* Finish test coverage

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-19 06:10:59 -04:00
G Johansson
f74103c57e
Add config flow to Workday (#72558)
* Initial commit Workday Config Flow

* Add tests

* Remove day_to_string

* new entity name, new depr. version, clean

* Use repairs for depr. warning

* Fix issue_registry moved

* tweaks

* hassfest

* Fix CI

* FlowResultType

* breaking version

* remove translation

* Fixes

* naming

* duplicates

* abort entries match

* add_suggested_values_to_schema

* various

* validate country

* abort_entries_match in option flow

* Remove country test

* remove country not exist string

* docstring exceptions

* easier

* break version

* unneeded check

* slim tests

* Fix import test

* Fix province in abort_match

* review comments

* Fix import province

* Add review fixes

* fix reviews

* Review fixes
2023-04-19 11:50:11 +02:00
Jan Čermák
9680161701
Add RAPT Bluetooth integration (#87872)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-16 17:19:03 -10:00
G Johansson
00847ee4bc
Add config flow to Brottsplatskartan (#70233)
* Brottsplatskartan Config Flow

* Fix import

* Modify sensor

* Mod version

* Mod version 2

* has_entity_name

* Fix api constructor

* Switch to issue for depr.

* Fix docstrings

* Minor cleaning

* Fix argument for bpk constructor

* remove translations

* Fix tests

* reset config

* uuid to conftest

* hassfest

* depr version

* unique id

* reset not linked changes

* review comments

* fix area none

* relevant changes

* depr version

* slim test

* unique_id

* create_entry

* review comments and tests

* fix init test

* review comments
2023-04-12 11:05:24 +02:00
Michael Hansen
78fec33b17
Voip integration (#90945)
* Media playback working

* Working on OPUS audio

* Before rollback

* Fix is_end

* First working pipeline

* Clean up

* Remove asserts

* Send HA version in SDP

* Use async_pipeline_from_audio_stream

* Use config flow with allowed IP

* Satisfy ruff

* Remove use of regex for SIP IP

* Use voip-utils

* Fix imports

* Add Pipeline to __all__

* Fix voice assistant tests

* Basic VoIP test

* Run hassfest

* Generate requirements

* Bump voip utils (missing requirement)

* Allow tts_options to be passed in to pipeline run

* Add config flow tests

* Update test snapshots

* More tests

* Remove get_extra_info

* Appeasing the codebot
2023-04-11 20:25:05 -04:00
Erik Montnemery
8025fbf398
Remove the coronavirus integration (#90934)
* Remove the coronavirus integration

* Run hassfest and gen_requirements_all
2023-04-06 10:43:09 -04:00
tronikos
49468ef5d0
Android TV Remote integration (#89935)
* Android TV Remote integration

* Add diagnostics

* Remove test pem files from when api was not mocked

* Address review comments

* Remove hass.data call in test

* Store the certificate and key in /config/.storage

* update comments

* Update homeassistant/components/androidtv_remote/__init__.py

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

* import callback

* use async_generate_cert_if_missing

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-04-05 21:00:40 -04:00
luar123
f0710bae06
Add config-flow to Snapcast (#80288)
* initial stab at snapcast config flow

* fix linting errors

* Fix linter errors

* Add import flow, support unloading

* Add test for import flow

* Add dataclass and remove unique ID in config-flow

* remove translations

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Refactor config flow and terminate connection

* Rename test_config_flow.py

* Fix tests

* Minor fixes

* Make mock_create_server a fixture

* Combine tests

* Abort if entry already exists

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Move HomeAssistantSnapcast to own file. Clean-up last commit

* Split import flow from user flow. Fix tests.

* Use explicit asserts. Add default values to dataclass

* Change entry title to Snapcast

---------

Co-authored-by: Barrett Lowe <barrett.lowe@gmail.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-30 07:42:09 +02:00
Chris Xiao
7c778847e7
Add config flow to qBittorrent (#82560)
* qbittorrent: implement config_flow

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: add English translations

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: create sensors with config_flow

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: set unique_id and icon

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: add tests for config_flow

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: detect duplicate config entries

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: import YAML config

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: update coveragerc

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* qbittorrent: delete translations file

* create `deprecated_yaml` issue in `setup_platform`

* move qbittorrent test fixtures to conftest.py

* improve code quality & remove wrong unique_id

* keep PLATFORM_SCHEMA until YAML support is removed

* remove CONF_NAME in config entry, fix setup_entry

* improve test suite

* clean up QBittorrentSensor class

* improve user flow tests

* explicit result assertion & minor tweaks in tests

Co-authored-by: epenet <epenet@users.noreply.github.com>

* implement entry unloading

Co-authored-by: epenet <epenet@users.noreply.github.com>

* add type hints

* tweak config_flow data handling

---------

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>
Co-authored-by: epenet <epenet@users.noreply.github.com>
2023-03-29 22:13:41 +02:00
Michael
45262c6114
Implement config flow for nextcloud (#89396)
* implement config flow

* add tests

* fix hassfest and requirements

* abort import on connection error

* add add_suggested_values_to_schema

* mock async_setup_entry

* revert code owner change

* fix try connect in config flow

* add device info

* allow multiple instances

* fix import in config flow

* remove custom scan interval from coordinator

* applay suggestions

* apply suggestions

* take over ownership from @meichthys

* cleanup import data before passing to user step

* apply suggestions to tests

* add untested files to .coveragerc
2023-03-26 21:14:17 +02:00
Thijs W
b8bda93d87
Add config flow to frontier_silicon (#64365)
* Add config_flow to frontier_silicon

* Add missing translation file

* Delay unique_id validation until radio_id can be determined

* Fix tests

* Improve tests

* Use FlowResultType

* Bump afsapi to 0.2.6

* Fix requirements_test_all.txt

* Stash ssdp, reauth and unignore flows for now

* Re-introduce SSDP flow

* hassfest changes

* Address review comments

* Small style update

* Fix tests

* Update integrations.json

* fix order in manifest.json

* fix black errors

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Address review comments

* fix black errors

* Use async_setup_platform instead of async_setup

* Address review comments on tests

* parameterize tests

* Remove discovery component changes from this PR

* Address review comments

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Add extra asserts to tests

* Restructure _async_step_device_config_if_needed

* Add return statement

* Update homeassistant/components/frontier_silicon/media_player.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-10 10:26:03 +01:00
epenet
699cc6c092
Adjust docstring on hassfest generated files (#89080) 2023-03-03 11:34:20 +01:00
Stephan Uhle
adb0455bd2
Add config flow to EDL21 (#87655)
* Added config_flow for edl21.

* Added already_configured check.

* Added config_flow test

* Added setup of the edl21 from configuration.yaml

* Ran script.gen_requirements_all

* Removed the generated translation file.

* Added a deprecation warning when importing from configuration.yaml.

* Readded the platform schema.

* Added handling of optional name for legacy configuration.

* Fixed handling of default value in legacy configuration.

* Added duplication check entries created via legacy config.

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Apply suggestions from code review

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-01 21:19:20 +01:00
Emory Penney
0e8d28dab0
Add Config Flow to Obihai (#88627)
* Obihai: Config Flow Only

* Remove reboot service

* Update .coveragerc

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* PR Feedback

* Use Issue Registry

* Add config_flow tests

* Another pass with pre-commit

* Resolve cyclical import and move sensorClasses to sensor

* Update homeassistant/components/obihai/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/obihai/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/obihai/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/obihai/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Another round of feedback

* More PR feedback

* Offline testing, already_configured is required

* Update homeassistant/components/obihai/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/obihai/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/obihai/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Cleanup

* Update homeassistant/components/obihai/__init__.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* PR feedback

* Backout today's changes: Fix mypy error

* Update tests/components/obihai/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/obihai/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/obihai/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/obihai/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Don't plan ahead

* PR feedback

* Update homeassistant/components/obihai/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Cleanup strings

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-02-27 17:22:15 +01:00
Erik Montnemery
4db40810dd
Add support for dormakaba dKey locks (#87501)
* Add support for dormakaba dKey locks

* Pylint

* Address review comments

* Add test for already configured entry

* Add user flow

* Address review comments

* Simplify config flow

* Add tests

* Sort manifest

* Remove useless _abort_if_unique_id_configured

* Remove config entry update listener

* Simplify user flow

* Remove startup event

* Revert "Simplify user flow"

This reverts commit 0ef9d1c6bb.
2023-02-12 13:46:31 +01:00
MarkGodwin
ce9a514667
TP-Link Omada integration (#81223)
* TP-Link Omada integration
Support for PoE config of network switch ports

* Bump omada client version

* Fixing tests

* Refactored site config flow

* Code review comments

* Fixed tests and device display name issue

* Bump isort to fix pre-commit hooks

* Hassfest for the win

* Omada code review

* Black

* More config flow test coverage

* Full coverage for omada config_flow

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-02-06 10:57:18 -05:00
Klaas Schoute
3723241937
Add easyEnergy integration (#86266) 2023-02-03 19:56:17 +01:00
J. Nick Koston
03a8dcfdc1
Add Mopeka integration (#86500)
* Add Mopeka integration

Mopeka makes BLE propane tank monitors

* cover

* wip

* wip

* bump lib

* strip binary sensor

* all sensors

* all sensors

* update tests

* change quality

* change quality

* adjust

* integration_type, strict-typing
2023-01-25 12:28:13 -05:00
Paulus Schoutsen
7d641e4d3e
Add OpenAI integration (#86621)
* Add OpenAI integration

* Remove empty manifest fields

* More prompt tweaks

* Update manifest

* Update homeassistant/components/openai_conversation/config_flow.py

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

* Address comments

* Add full integration tests

* Cripple the integration

* Test single instance

Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-25 11:30:13 -05:00
Franck Nijhof
5f1edbccd1
Remove Almond integration (#86616) 2023-01-25 12:21:26 +01:00
On Freund
2c9e8ad475
ReadYourMeter Pro integration (#85986)
* ReadYourMeter Pro integration

* Add __init__.py to .coveragerc

* Address code review comments

* More code review comments
2023-01-24 22:41:33 +02:00
Erik Montnemery
9ef86b7b66
Add Thread integration (#86283)
* Add Thread integration

* Address review comments

* Address review comments
2023-01-23 10:27:24 -05:00
fwestenberg
29b2b6727e
Add Stookwijzer (#84435)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-20 13:42:47 +01:00
Erik Montnemery
b4abfb1697
Adjust Thread config flow (#86097)
* Adjust Thread config flow

* Improve tests

* Update homeassistant/components/otbr/config_flow.py

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

Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-17 13:27:33 -05:00
Brandon Rothweiler
2ed6df9003
Add EufyLife Bluetooth integration (#85907)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-16 18:29:50 -10:00
Robert Hillis
3d7c61bbed
Add D-Link config flow (#84927) 2023-01-10 14:10:56 -10:00