Commit Graph

2480 Commits

Author SHA1 Message Date
Joost Lekkerkerker 074eb966dd
Add config flow to AfterShip (#100872)
* Add config flow to Aftership

* Add config flow to Aftership

* Fix schema

* Update homeassistant/components/aftership/strings.json

Co-authored-by: Robert Resch <robert@resch.dev>

* Fix feedback

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2023-09-26 18:05:23 +02:00
Maikel Punie 8a44adb447
Add binary sensors for duotecno (#100844)
* Add binary sensors for duotecno

* Add comments
2023-09-25 13:34:39 +02:00
Maikel Punie 19854ded16
Add duotecno climate (#99333)
* Add duotecno climate

* Add climate to .coveragerc

* Update homeassistant/components/duotecno/climate.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/duotecno/climate.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* more comments

* more comments

* more comments

* more comments

* fix typo

* Add translation key

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-25 12:52:51 +02:00
David Knowles f8a8fe760d
Add config flow to Hydrawise (#95589)
* Add config flow to Hydrawise

* Raise an issue when a YAML config is detected

* Add a test for YAML import

* Add missing __init__.py

* Update CODEOWNERS

* Update requirements_test_all.txt

* Add config flow data to strings.json

* Hande scan_interval not being in YAML on import

* Fix requirements

* Update deprecation dates

* Update requirements_test_all.txt

* Changes from review

* Update homeassistant/components/hydrawise/__init__.py

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

* Add already_configured to strings.json

* Add back setup_platform functions

* Apply suggestions from code review

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

* Add back setup_platform

* Update requirements_test_all.txt

* Run black on hydrawise/*.py

* Add missing import of HOMEASSISTANT_DOMAIN

* Use more specific errors in config flow

* Add additional tests

* Update config flow to use pydrawise.legacy

* Re-work YAML deprecation issues

* Revert some changes to binary_sensor, as requested in review

* Changes requested during review

* Apply suggestions from code review

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

* Remove unused STE_USER_DATA_SCHEMA

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

* Update comment in setup_platform

* Re-work the config flow again

* Apply suggestions from code review

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

* Update tests

* Add back the _default_watering_timer attribute

* Bump deprecation dates

* Update requirements_test_all.txt

* Update CODEOWNERS

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-24 00:03:07 +02:00
Allen Porter 781bc5b3bc
Add tests for fitbit integration (#100765)
* Add tests for fitbit integration

* Update coveragerc

* Update test requirements
2023-09-23 12:04:44 -07:00
Joost Lekkerkerker 71aef4e95a
Add media extractor tests (#100462)
* Add tests for media extractor

* Complete test coverage

* Fix test dep
2023-09-23 12:04:29 -07:00
Pedro Januário 794736b503
Add switch platform to ecoforest integration (#100708)
* add switch platform to ecoforest integration

* ignore switch.py from coverage

* rename mixin

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* update translations

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* remove translation key

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* move attr name to description

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* fix broken change

* use entity description action

* use lambda with awaitable

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-22 12:20:48 +02:00
Pedro Januário cd30286913
Add number platform to ecoforest (#100694)
* add power number entity to ecoforest integration

* fix number.py header

* minor fixes

* change power to power level

* update comment for native value prop

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* exclude number.py from coverage

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-21 22:36:39 +02:00
jimmyd-be e57156dd9c
Add Renson button entity (#99494)
Co-authored-by: Robert Resch <robert@resch.dev>
2023-09-21 17:55:30 +02:00
Jan-Philipp Benecke a08b74c550
Move coolmaster coordinator to its own file (#100425) 2023-09-21 15:20:58 +02:00
Pedro Januário c170babba6
Add ecoforest integration (#100647)
* Add ecoforest integration

* fix file title

* remove host default from schema, hints will be given in the documentation

* moved input validation to async_step_user

* ensure we can receive device data while doing entry setup

* remove unecessary check before unique id is set

* added shorter syntax for async create entry

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* use variable to set unique id

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Use _attr_has_entity_name from base entity

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* remove unecessary comments in coordinator

* use shorthand for device information

* remove empty objects from manifest

* remove unecessary flag

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* use _async_abort_entries_match to ensure device is not duplicated

* remove unecessary host attr

* fixed coordinator host attr to be used by entities to identify device

* remove unecessary assert

* use default device class temperature trasnlation key

* reuse base entity description

* use device serial number as identifier

* remove unused code

* Improve logging message

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Remove unused errors

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Raise a generic update failed

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* use coordinator directly

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* No need to check for serial number

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* rename variable

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* use renamed variable

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* improve assertion

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* use serial number in entity unique id

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* raise config entry not ready on setup when error in connection

* improve test readability

* Improve python syntax

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* abort when device already configured with same serial number

* improve tests

* fix test name

* use coordinator data

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* improve asserts

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* fix ci

* improve error handling

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-21 15:18:55 +02:00
Jan-Philipp Benecke 7af62c35f5
Move faa_delays coordinator to its own file (#100548) 2023-09-20 08:59:49 +02:00
Jan-Philipp Benecke 03af467918
Move renson coordinator to its own file (#100610) 2023-09-20 08:47:20 +02:00
elmurato a2a62839bc
Add DataUpdateCoordinator to Minecraft Server (#100075) 2023-09-19 15:59:58 +02:00
Simone Chemelli 2722e5ddaa
Add Vodafone Station sensor platform (#99948)
* Vodafone: add sensor platform

* fix for model VOX30 v1

* fix, cleanup, 2 new sensors

* apply review comments

* apply last review comment
2023-09-18 21:31:04 +02:00
Ravaka Razafimanantsoa f99dedfb42
Add switchbot cloud integration (#99607)
* Switches via API

* Using external library

* UT and checlist

* Updating file .coveragerc

* Update homeassistant/components/switchbot_via_api/switch.py

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

* Update homeassistant/components/switchbot_via_api/switch.py

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

* Update homeassistant/components/switchbot_via_api/switch.py

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

* Review fixes

* Apply suggestions from code review

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

* This base class shouldn't know about Remote

* Fixing suggestion

* Sometimes, the state from the API is not updated immediately

* Review changes

* Some review changes

* Review changes

* Review change: Adding type on commands

* Parameterizing some tests

* Review changes

* Updating .coveragerc

* Fixing error handling in coordinator

* Review changes

* Review changes

* Adding switchbot brand

* Apply suggestions from code review

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

* Review changes

* Adding strict typing

* Removing log in constructor

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-16 16:00:41 +02:00
Jan-Philipp Benecke 7723a9b36b
Move airtouch4 coordinator to its own file (#100424) 2023-09-15 10:04:41 +02:00
Jan-Philipp Benecke 772ac9766b
Move awair coordinators to their own file (#100411)
* Move awair coordinators to their file

* Add awair/coordinator.py to .coveragerc
2023-09-15 07:52:29 +02:00
Jan-Philipp Benecke 157647dc44
Move solarlog coordinator to own file (#100402) 2023-09-14 21:52:21 +02:00
Joost Lekkerkerker 6fc1407613
Extract Withings API specifics in own class (#100363)
* Extract Withings API specifics in own class

* Extract Withings API specifics in own class

* Ignore api test coverage

* fix feedback
2023-09-14 13:31:54 +02:00
starkillerOG 98c9edc00c
Netgear cleanup (#99505)
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-14 12:06:40 +02:00
Jan-Philipp Benecke 72f5c0741b
Add missing sms coordinator to .coveragerc (#100327) 2023-09-13 15:29:16 -05:00
Alex Yao 5ba573a1b4
Add Life360 Location Update Button (#99559)
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: alexyao2015 <alexyao2015@users.noreply.github.com>
2023-09-12 09:34:11 +02:00
Michael Arthur 8beace265b
Add unit tests for sensors Electric Kiwi (#97723)
* add unit tests for sensors

* newline long strings

* unit test check and move time

* rename entry to entity

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* add types to test

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* fix newlined f strings

* remove if statement

* add some more explaination

* Update datetime

Co-authored-by: Robert Resch <robert@resch.dev>

* Simpler time update

Co-authored-by: Robert Resch <robert@resch.dev>

* add missing datetime import

* Update docustring - grammar

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

* address comments and issues raised

* address docstrings too long

* Fix docstring

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-09-11 01:30:25 +02:00
jimmyd-be 6c45f43c5d
Renson number entity (#99358)
* Starting number sensor

* Filter change config

* Add translation to number entity

* add number entity to .coveragerc

* Moved has_entity_name to description + changed name of entity

* Add self.coordinator.async_request_refresh() after changing value

* Add device calss and unit of measurement to number entity
2023-09-11 01:24:57 +02:00
Aidan Timson 51899ce5ad
Add System Bridge notifications (#82318)
* System bridge notifications

Add notify platform

Add file to coverage

Restore and fix lint after rebase

Cleanup

Use entity to register notify service

Fix pylint

Update package to 3.6.0 and add audio actions

Update package to fix conflict

Remove addition

* Run pre-commit run --all-files

* Update homeassistant/components/system_bridge/notify.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Format

* Fix

* Remove duplicate import

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-10 17:32:52 +02:00
Kevin Worrel 092580a3ed
Bump screenlogicpy to v0.9.0 (#92475)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-09 17:39:54 -05:00
jimmyd-be 1c27a0339d
Renson fan (#94495)
* Add fan feature

* Changed order of platform

* Use super()._handle_coordinator_update()

* format file

* Set _attr_has_entity_name

* Cleanup Fan code

* Refresh after setting ventilation speed + translation

* remove unused translation key
2023-09-07 20:37:14 +02:00
Quentame 1a22ab77e1
Fix Freebox disk free space sensor (#99757)
* Fix Freebox disk free space sensor

* Add initial value assert to check results
2023-09-07 10:28:08 +02:00
Jan Bouwhuis b815ea1332
Revert "Remove imap_email_content integration" (#99713) 2023-09-06 11:54:18 +02:00
Jan Bouwhuis c64d173fcb
Remove imap_email_content integration (#99484) 2023-09-05 21:50:51 +02:00
starkillerOG 3c30ad1850
Motion blinds duplication reduction using entity baseclass (#99444) 2023-09-02 21:51:58 +02:00
Paarth Shah 4d3b978398
Change matrix component to use matrix-nio instead of matrix_client (#72797) 2023-09-02 15:02:55 +02:00
Jan-Philipp Benecke bbc390837e
Move airnow coordinator to its own file (#99423) 2023-09-01 08:29:07 +02:00
Jan-Philipp Benecke 2e7018a152
Move tankerkoenig coordinator and base entity to its own file (#99416)
* Move tankerkoenig coordinator and entity to its own file

* Add coordinator.py and entity.py to .coveragerc
2023-08-31 19:39:17 +02:00
Jan-Philipp Benecke 5819091af7
Move octoprint coordinator to its own file (#99359)
Move octoprint coordinator to own file
2023-08-30 22:31:51 +02:00
jimmyd-be 9e8d89c4f5
Renson binary sensors (#94490)
* Add binary sensors

* Add Renson services

* Add fan to Renson

* Revert "Add fan to Renson"

This reverts commit 8e7c09671e.

* Revert "Add Renson services"

This reverts commit d862976c81.

* Add binary sensor to coveragerc file

* Update homeassistant/components/renson/binary_sensor.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/renson/binary_sensor.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Changed hard coded names to use translation

* Code cleaning

* Use super()._handle_coordinator_update()

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-08-28 21:15:18 +02:00
Simone Chemelli 1692d83063
Vodafone Station device tracker (#94032)
* New integration for Vodafone Station

* coveragerc

* Add ConfigFlow,ScannerEntity,DataUpdateCoordinator

* Introduce aiovodafone lib

* heavy cleanup

* bump aiovodafone to v0.0.5

* add config_flow tests (100% coverage)

* run pre-comimit scripts again

* Remove redundant parameter SSL

* rename and cleanup

* cleanup and bug fix

* cleanup exceptions

* constructor comment review

* improve test patching

* move VodafoneStationDeviceInfo to dataclass

* intriduce home field

* dispacher cleanup

* remove extra attributes (reduces state writes)

* attempt to complete test flow

* complete flow for test_exception_connection

* add comment about unique id
2023-08-28 15:10:23 +02:00
Rami Mosleh 1d403a961f
Reorganize Transmission entry setup (#99195)
* simplify integration setup

* Update transmission entry setup to avoid None attributes

* keep api property in TransmissionData

* Apply suggestion

* Add __init__.py tp .coveragerc
2023-08-28 13:13:35 +02:00
Joost Lekkerkerker fbe2228c3f
Extract Ambient Station base entity to separate file (#99142)
* Extract Ambient Station entity to separate file

* Add to coveragerc
2023-08-27 20:09:10 +02:00
Marty Sun 588db501fb
Add new integration Yardian (#97326)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-08-24 17:48:49 -05:00
G Johansson 3b31c58eba
Add coordinator test for Yale Smart Living (#98638) 2023-08-24 11:44:04 +02:00
Erik Montnemery b143fe285f
Enable code coverage for metoffice sensor + weather (#98863) 2023-08-23 12:29:03 +03:00
Joost Lekkerkerker 538de6d1f3
Introduce base class for Neato (#98071)
Co-authored-by: Robert Resch <robert@resch.dev>
2023-08-21 12:04:12 +02:00
J. Nick Koston 38af44225e
Refactor doorbird to avoid using events internally (#98585) 2023-08-20 07:49:33 -05:00
Jack Boswell 8a6bde1191
Add Starlink device tracker (#91445)
* Fetch location data and redact in diagnostics

* Implement device tracker

* Fix failing tests

* Update starlink-grpc-core

* Update coveragerc

* Hardcode GPS source type

* Use translations

* Move DEVICE_TRACKERS a little higher in the file

* Separate status and location check try/catches

* Revert "Separate status and location check try/catches"

This reverts commit 7628ec62f6.
2023-08-19 11:36:23 +02:00
Simone Chemelli ab9d6ce61a
New integration for Comelit SimpleHome (#96552)
* New integration for Comelit SimpleHome

* Address first review comments

* cleanup

* aiocomelit bump and coordinator cleanup

* address review comments

* Fix some review comments

* Use config_entry.unique_id as last resort

* review comments

* Add config_flow tests

* fix pre-commit missing checks

* test_conflig_flow coverage to 100%

* fix tests

* address latest review comments

* new ruff rule

* address review comments

* simplify unique_id
2023-08-18 08:40:23 +02:00
Mike Heath cf8c9ad184
Add PoE switch tests (#95087)
* Add PoE switch tests

* Update tests/components/tplink_omada/test_switch.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Remove files covered by tests from exclusion

* Rename entity_name to entity_id

* Fix test, use snapshot, other improvements

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-08-16 13:38:53 +02:00
J. Nick Koston b083f5bf89
Add some typing to doorbird (#98483) 2023-08-16 11:33:25 +02:00
Charles Garwood 92535277be
Add number platform & battery setpoint entities to Enphase integration (#98427)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-08-15 13:08:11 -05:00
Charles Garwood e3438baf49
Add select platform to Enphase integration (#98368)
* Add select platform to Enphase integration

* Review comments pt1

* Review comments pt2

* Review comments

* Additional tweaks from code review

* .coveragerc

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-08-14 20:23:16 -04:00
Renier Moorcroft 00c60151d4
Add Ezviz siren entity (#93612)
* Initial commit

* Add siren entity

* Update coveragerc

* Cleanup unused entity description.

* Add restore and fix entity property to standards.

* Schedule turn off to match camera firmware

* Only add siren for devices that support capability

* Removed unused attribute and import.

* Add translation

* Update camera.py

* Update strings.json

* Update camera.py

* Cleanup

* Update homeassistant/components/ezviz/siren.py

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

* use description

* Apply suggestions from code review

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

* Update strings.json

* Dont inherit coordinator class.

* Add assumed state

* Update homeassistant/components/ezviz/siren.py

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

* Reset delay listener if trigered

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-08-13 13:10:53 +02:00
Charles Garwood 4342a95be0
Add Enphase switch platform and grid enable switch (#98261)
* Add Enphase switch platform and grid enable switch

* Update dependency

* Fix docstrings

* Update .coveragerc
2023-08-11 13:31:47 -04:00
Joost Lekkerkerker e6ba6c295c
Add base entity to Garages Amsterdam (#98172) 2023-08-11 13:55:38 +02:00
J. Nick Koston 7e9d0cca44
Refactor enphase_envoy to have a shared base class (#98088)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-08-09 01:28:27 -10:00
Charles Garwood c154077177
Add Encharge binary sensors to Enphase integration (#98039)
* Add Encharge binary sensors to Enphase integration

* Code review minor cleanup

* Add to coveragerc
2023-08-08 20:03:02 +02:00
Massimiliano Cannarozzo 8b56e28838
Add neato dismiss alert button (#97572)
* Bump pybotvac

* Add neato dismiss alert button

* fixup! Add neato dismiss alert button

* fixup! Add neato dismiss alert button

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* fixup! Add neato dismiss alert button

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* fixup! Add neato dismiss alert button

* fixup! Add neato dismiss alert button

* fixup! Add neato dismiss alert button

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

* fixup! Add neato dismiss alert button

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

* fixup! Add neato dismiss alert button

* fixup! Add neato dismiss alert button

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-08-08 14:35:41 +02:00
G Johansson c4da5374ae
Refactor Trafikverket Train to improve config flow (#97929)
* Refactor tvt

* review fixes

* review comments
2023-08-07 17:25:02 +02:00
Joost Lekkerkerker 42bca0f94a
Complete test coverage for OpenSky (#97863)
* Use mockobject for OpenSky testing

* Complete test coverage for OpenSky

* Complete test coverage for OpenSky

* Use method patching
2023-08-06 19:39:24 +02:00
J. Nick Koston 02e546e3ef
Refactor enphase_envoy to use pyenphase library (#97862) 2023-08-05 13:33:16 -10:00
Alberto Geniola e5261fe2a3
Implement Elmax cover platform (#79409)
* Implement Elmax cover platform.

* Reduce the number of code lines by leveraging the := operator

* Move _COMMAND_BY_MOTION_STATUS declaration at the top

* Remove redundant null-check

* Move conditional platform setup logic into the platform itself

* Remove redundant log

* Change log severity for stop request on IDLE cover state

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-08-05 22:03:51 +02:00
Jack Boswell 5fcac42a0f
Add untested Starlink components to .coveragerc (#97825) 2023-08-05 19:55:35 +02:00
Maikel Punie 6570517330
Add lightplatform to Duotecno (#97582)
* add light platform

* Add light to coveragerc

* Update homeassistant/components/duotecno/light.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/duotecno/light.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/duotecno/light.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/duotecno/light.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/duotecno/light.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/duotecno/light.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* comments

* revert

* re-implement comments

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-08-05 18:29:46 +02:00
Michael Arthur 05e2acb091
Add hour of free power select to Electric Kiwi (#97515)
* add select sensor to Electric Kiwi

* Update homeassistant/components/electric_kiwi/select.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* simplify the HOP select since there is only one

* remove handle coordinator state

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-08-03 12:06:42 +02:00
Maikel Punie d7af1e2d5d
Add duotecno covers (#97205) 2023-07-26 11:45:55 +02:00
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
elmurato 90bf2d3076
Move Minecraft Server base entity to its own file (#97187) 2023-07-25 10:14:01 +02:00
Renier Moorcroft 5ec633a839
Add Ezviz button entities (#93647)
* Initial commit

* Add button for ptz

* coveragerc

* Add ptz buttons to PTZ cameras only

* Describe support capbility

* Improve typing

* bump api version.

* Match entity naming used throughout

* Add translation

* Create ir before execution and breaks in version

* Fix for translation missing name key.

* Change depreciation to 2024.2.0

* Update camera.py

* Tiny spelling tweaks

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-25 00:31:44 +02:00
J. Nick Koston 095146b163
Fix has_entity_name not always being set in ESPHome (#97055) 2023-07-23 10:45:48 +02:00
Joost Lekkerkerker fe0d33d97c
Move Aseko coordinator to separate file (#95120) 2023-07-22 16:12:28 +02:00
J. Nick Koston 2c4e4428e9
Decouple more of ESPHome Bluetooth support (#96502)
* Decouple more of ESPHome Bluetooth support

The goal is to be able to move more of this into an external library

* Decouple more of ESPHome Bluetooth support

The goal is to be able to move more of this into an external library

* Decouple more of ESPHome Bluetooth support

The goal is to be able to move more of this into an external library

* Decouple more of ESPHome Bluetooth support

The goal is to be able to move more of this into an external library

* Decouple more of ESPHome Bluetooth support

The goal is to be able to move more of this into an external library

* fix diag

* remove need for hass in the client

* refactor

* decouple more

* decouple more

* decouple more

* decouple more

* decouple more

* remove unreachable code

* remove unreachable code
2023-07-21 16:41:50 -04:00
G Johansson 4e30056830
Add new Forecasting to Weather (#75219)
* Add new Forecasting to Weather

* Add is_daytime for forecast_twice_daily

* Fix test

* Fix demo test

* Adjust tests

* Fix typing

* Add demo

* Mod demo more realistic

* Fix test

* Remove one weather

* Fix weather example

* kitchen_sink

* Reverse demo partially

* mod kitchen sink

* Fix twice_daily

* kitchen_sink

* Add test weathers

* Add twice daily to demo

* dt_util

* Fix names

* Expose forecast via WS instead of as state attributes

* Regularly update demo + kitchen_sink weather forecasts

* Run linters

* Fix rebase mistake

* Improve demo test coverage

* Improve weather test coverage

* Exclude kitchen_sink weather from test coverage

* Rename async_update_forecast to async_update_listeners

* Add async_has_listeners helper

* Revert "Add async_has_listeners helper"

This reverts commit 52af3664bb06d9feac2c5ff963ee0022077c23ba.

* Fix rebase mistake

---------

Co-authored-by: Erik <erik@montnemery.com>
2023-07-21 17:30:48 +02:00
Renier Moorcroft 4916351d9a
Add EZVIZ AlarmControlPanelEntity (#96602)
* Add ezviz alarm panel

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Joakim Plate <elupus@ecce.se>
2023-07-21 12:01:02 +02:00
G Johansson db76bf3a9f
Implement coordinator in Trafikverket Train (#96916)
* Implement coordinator TVT

* Review comments

* Review changes
2023-07-20 10:40:34 +02:00
Joakim Plate 22fbd22943
Add more complete test coverage to gardena bluetooth (#96874)
* Add tests for switch

* Add tests for number

* Add tests for 0 sensor

* Enable coverage for gardena bluetooth
2023-07-19 00:31:01 +02:00
Franck Nijhof 727a72fbaa
Remove mitemp_bt integration (#96869) 2023-07-18 23:19:03 +02:00
Franck Nijhof 4fefbf0408
Remove miflora integration (#96868) 2023-07-18 23:15:06 +02:00
Joakim Plate 878429fdec
Add binary sensor for valve connectivity for gardena bluetooth (#96810)
* Add binary_sensor to gardena

* Add tests for binary_sensor
2023-07-18 09:00:25 +02:00
Joakim Plate 088d04fe0f
Add sensor to gardena (#96691) 2023-07-17 09:11:23 +02:00
RenierM26 3e429ae081
Add Ezviz last motion picture image entity (#94421)
* Initial commit

* Update camera.py

* ignore type mismatch on append.

* Use new image entity.

* coveragerc update

* Remove all changes to camera in this pull.

* Fix docstring.

* remove old "last_alarm_pic" sensor

* Update image entity

* bypass for content check error

* Fix last updated not sting object

* Remove redundant url change check.

* Remove debug string

* Check url change on coordinator data update.

* Add translation key for name.

* simplify update check

* Rebase EzvizLastMotion ImageEntity

* Change logging to debug.
2023-07-14 08:50:36 +02:00
Joakim Plate 52c7ad130d
Add number entity to gardena (#96430) 2023-07-13 06:34:28 +02:00
RenierM26 899adfa74c
Add Ezviz select entity (#93625)
* Initial commit

* Add select entity

* coveragerc

* Cleanup

* Commit suggestions.

* Raise issue before try except

* Add translation key

* Update camera.py

* Update camera.py

* Disable old sensor by default instead of removing.

* Apply suggestions from code review

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

* IR fix flow

* Fix conflict

* run black

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-07-12 18:33:56 +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
starkillerOG bc9b9048f0
Add Reolink sensor platform (#96323)
* Add Reolink sensor platform

* fix styling

* Add state class

* Add Event connection sensor

* Update homeassistant/components/reolink/sensor.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Use translation keys

* fix json

* fix json 2

* fix json 3

* Apply suggestions from code review

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-07-11 21:36:44 +02:00
Allen Porter c4a39bbfb1
Remove Legacy Works With Nest (#96111)
* Remove Legacy Works With Nest

* Simplify nest configuration

* Cleanup legacy nest config entries
2023-07-09 19:38:05 -07:00
J. Nick Koston e38f55fdb6
Move ESPHomeManager into its own file (#95870)
* Move ESPHomeManager into its own file

This is not a functional change. This is only a reorganization
ahead of some more test coverage being added so moving tests
around can be avoided later.

* relos

* fixes

* merge a portion of new cover since its small and allows us to remove the __init__ from .coveragerc
2023-07-08 09:19:44 +02:00
Mike Woudenberg ba1266a893
Add sensors to LOQED integration for battery percentage and BLE stength (#95726)
* Add sensors for battery percentage and BLE stength

* Use translatable name for BLE strength, no longer pass enity to sensor
2023-07-06 23:09:34 -04:00
J. Nick Koston 505f8fa363
Fix ESPHome camera not accepting the same exact image bytes (#95822) 2023-07-05 07:17:28 -05:00
Aaron Collins f028d1a1ca
Bump pydaikin 2.10.5 (#95656) 2023-07-05 07:12:18 -05: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
Michael b64be798df
Fix qr code data update in AVM Fritz!Tools (#95470)
* use async_update

* improve tests

* use async_image
2023-06-28 19:57:03 +02:00
Joost Lekkerkerker 2747da784c
Move Fjaraskupan coordinator to separate file (#95342)
* Move coordinator to separate file

* Move coordinator to separate file

* Move coordinator to separate file
2023-06-28 10:41:50 +02:00
J. Nick Koston 72806bfaf2
Add more test coverage for ESPHome lights (#95415) 2023-06-28 08:40:21 +02:00
Michael 4daacf9c4b
Add Guest WiFi QR-Code image entity to AVM Fritz!Tools (#95282) 2023-06-27 23:48:28 +02:00
Richard Kroegel f1a54a510c
Re-add "deactivate air conditioning" button to bmw_connected_drive (#94765) 2023-06-27 19:55:46 +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
Joost Lekkerkerker d8e73b6a6b
Move FiveM entity class to separate file (#95348) 2023-06-27 13:17:51 +02:00
Joost Lekkerkerker af7b25d748
Move FiveM coordinator to separate file (#95339)
Move coordinator to separate file
2023-06-27 12:40:38 +03:00
J. Nick Koston 6d47feb595
Add tests for ESPHome cover platform (#95321) 2023-06-27 08:26:35 +02:00
J. Nick Koston 0af71851a4
Fix ESPHome button not getting device updates (#95311) 2023-06-26 22:34:37 -05:00
J. Nick Koston 9fe24c54e9
Add test coverage for ESPHome switch platform (#95306) 2023-06-26 17:49:00 -05:00
Joost Lekkerkerker 9e3706e3b9
Move Aurora entity to separate file (#95245) 2023-06-26 18:24:14 +02:00
Joost Lekkerkerker d14f04eb7e
Move Aurora coordinator to separate file (#95130) 2023-06-26 12:52:31 +02:00
J. Nick Koston ad17a89531
Add additional coverage for ESPHome sensor and number (#95226) 2023-06-26 12:29:38 +02:00
J. Nick Koston 79f9a8a257
Add test coverage for esphome lock platform (#95023) 2023-06-24 23:10:47 -04:00
J. Nick Koston 3d8bf33d03
Add test coverage for esphome alarm control panels (#95090) 2023-06-23 12:59:05 +01:00
J. Nick Koston fe71ed8c50
Add esphome media player tests (#95069) 2023-06-22 21:28:58 +02:00
J. Nick Koston 66b2214c55
Add esphome sensor tests (#95077) 2023-06-22 21:02:47 +02:00
J. Nick Koston c7f2dab13c
Add climate tests to esphome (#95045) 2023-06-22 20:31:55 +02:00
J. Nick Koston 1cf4a008c3
Add coverage for binary_sensor platform to esphome (#95067) 2023-06-22 19:55:28 +02:00
J. Nick Koston ed55632a66
Add esphome fan platform tests and remove unreachable code (#95025) 2023-06-22 11:29:59 +02:00
J. Nick Koston 65a5244d5a
Fix race and add test coverage for esphome select platform (#95019) 2023-06-22 01:19:47 +02:00
Graham Brown cecdc3bd47
ESPHome Alarm Control Panel (#92357) 2023-06-19 19:19:17 -05:00
Jan-Philipp Benecke 7d0f5733c2
Improve the code quality of the Discovergy integration (#94165)
* Remove option flow, refactor and improve the code quality after review in PR #54280

* Remove coordinator.py from coverage report

* Some minor improvements for unit tests

* Remove _LOGGER

* Use pytest.fixture and some more improvments

* Add back empty __init__

* Fix docstring

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-11 12:51:43 +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
Joost Lekkerkerker b3a001996d
Improve coverage for LastFM (#93661)
* Improve coverage for LastFM

* Improve tests

* Improve tests
2023-06-08 16:55:16 -04:00
Shay Levy a6bb70c5d2
Remove goalfeed integration (#94129) 2023-06-06 20:04:53 -04: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
RenierM26 e05c04fadb
Add Ezviz light entity (#93710)
* Initial commit

* Add ezviz light entity.

* coveragerc

* Apply suggestions from code review

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-06-01 13:01:57 +02:00
andarotajo d421a51576
Add coordinator to dwd_weather_warnings (#93720)
* Add data coordinator

* Specify coordinator data type

* Apply code review changes
2023-05-30 20:22:27 -04:00
RenierM26 f86cc34644
Add Ezviz number entity (#93366)
* Initial commit

* Add number entity.

* update coveragerc

* Add services back and add depreciation repair.

* Remove redundant typing declaration.

* Case change in strings.

* Apply cleanups from simular pull request.

* Commit suggestions.
2023-05-25 11:09:47 +02:00
MarkGodwin e97b331942
Add gateway WAN/LAN port connectivity entities to TP-Link Omada (#91905)
* Add gateway WAN/LAN port status entities

* Fix copy pasta comments

* Add omada binary_sensor to coveragerc
2023-05-24 15:12:51 +02:00
RenierM26 497fa1980b
Add Ezviz update entity (#85377)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-05-23 12:32:14 +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
Austin Mroczek 16c915864b
Add diagnostic sensors for TotalConnect (#73152)
* add diagnostic sensors

* test binary_sensor.py file

* add tests for binary sensor

* fix zone type checks and error on unknown

* improve entity tests

* hide entities by default

* Revert "hide entities by default"

This reverts commit 9808d73247.

* Update homeassistant/components/totalconnect/binary_sensor.py

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

* update binary_sensor per comments

* update test

* move to _attr_extra_state_attributes

* no spaces in unique_id

* update per balloob suggestions

* fix typing

* fix black and mypy

* Apply suggestions from code review

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

* add more to binary_sensor tests

* remove unused import

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-05-07 10:27:33 +02:00
Joakim Plate f9fe3f4af4
Add nibe heat pump water heater entities (#79099)
* Add water heater platform

* Enable water heater platform

* No need to set target temp feature

* Split out preset mode

* Switch to parameters from lib

* Drop presets

* Add missing callback to coordinator update

* Drop support for heatpump activity

- Current entity model does not support it

* Handle s series lack of mappings

* Protect for missing operation modes to set
2023-05-06 11:41:11 +02:00
nachonam 2d510bfe0d
Add camera platform to Freebox (#88104)
* Add Freebox cameras

* Apply suggestions from code review

add code corrections after PR review

Co-authored-by: Quentame <polletquentin74@me.com>

* Update base_class.py

* add some code syntax corrections add unit tests

* add unit tests

* add syntax changes

* Update homeassistant/components/freebox/router.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/router.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/base_class.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/router.py

Co-authored-by: Quentame <polletquentin74@me.com>

* clear code  and add minor changes

* correct syntax error and check home granted access

* typing functions

* Update tests/components/freebox/conftest.py

don't needed, and will fix tests.

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

Rename _volume_micro variable

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

Use const not literal

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

set to true not needed

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

use _attr_supported_features instead _supported_features

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

overload the entity with command_flip property and set_flip not needed

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

Cameras does not default to False,

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

delete this function because is not needed

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

Co-authored-by: Quentame <polletquentin74@me.com>

* consts,  rollback _command flip is protected var

* VALUE_NOT_SET does not exists anymore

* Use HOME_COMPATIBLE_PLATFORMS

* Rename FreeboxHomeBaseClass to FreeboxHomeEntity

* Update Freebox Home comment

* Use CATEGORY_TO_MODEL to set model attr of FreeboxHomeEntity

* Use Home API from the router

* Add SERVICE_FLIP const

* Use SERVICE_FLIP const

* Fix typo in HOME_COMPATIBLE_PLATFORMS

* fix somme code issues

* use SERVICE_FLIP (lost in merge)

* use _attr_device_info

* clear code

* HOME_COMPATIBLE_PLATFORMS is a list

* Update homeassistant/components/freebox/home_base.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/home_base.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/config_flow.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/home_base.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/home_base.py

Co-authored-by: Quentame <polletquentin74@me.com>

* clear config_flow permission

* Update homeassistant/components/freebox/home_base.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

Co-authored-by: Quentame <polletquentin74@me.com>

* add untested files to. coveragerc

* clear unused attributes

* add not tested file camera.py

* clear unusued const

* add extra_state_attributes

* Update .coveragerc

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/freebox/camera.py

Co-authored-by: Quentame <polletquentin74@me.com>

* fetch _flip

* del flip service

* add device_info via_device

* Update .coveragerc

* Update .coveragerc

* Update .coveragerc

* Update .coveragerc

* Remove flip reference

* Fix issue on router without Home API

* Fix "Home access is not granted" log repeats every 30s

* Fix sensor device_info

---------

Co-authored-by: Quentame <polletquentin74@me.com>
2023-04-26 00:03:39 +02:00
Luke 1ae7610622
Add Vacuum test for Roborock (#91870) 2023-04-24 16:46:00 +02:00
J. Nick Koston e25885b943
Improve error reporting in onvif in config flow (#91876) 2023-04-24 15:20:37 +02: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
David F. Mulcahey 9c784ac622
Refactor ZHA (#91476)
* rename channel -> cluster handler

* remove refs to channels and create endpoint class

* remove remaining references to channels

* fix filter

* take in latest changes from #91403

* missed one

* missed a reference
2023-04-19 10:47:07 -04:00
mkmer 6aa1460143
Add tests to honeywell (#87209)
* lower case aiosomecomfort

* add tests

* Test updates for 0.0.6

* lower case aiosomecomfort

* Missing changes after merge

* Add missing type hints

* Fix tests for PR#89393

* Test hold on when setting temperature

* Remove unnecessary init function

* Remove unnecessary assert

* Address missing tests
Cleanup related to comments for EM

* Move to snapshot for static test

* Updated snapshot

* Remove unnecessary assert
2023-04-12 20:34:32 +02:00
Chuck Deal a4a8f6ebc8
Add platform state tests for vesync integration (#90466)
* Test coverage for init and common

* Update snapshot

* break setup state snapshot test across platforms

* Fix state snapshot test methods

* Remove the test_init snapshot

* Remove test_common and test_init changes

* refactor the request_mock fixture
2023-04-12 14:15:22 +02:00
andarotajo 08dd0a5efa
Move dwd_weather_warnings constants to separate file (#90810)
* Move constants to seperate file

* Use __package__ for the logger name

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

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-04-05 09:16:17 +02:00
Martin Hjelmare 8256d9b472
Remove xbox_live integration (#90592) 2023-03-31 14:30:04 -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
Jan Bouwhuis 24d0d15f38
Implement imap_content event for imap integration (#90242) 2023-03-28 21:02:43 +02:00
Robert Hillis 866518c5a0
Add tests to Lidarr (#79610)
* Add tests to Lidarr

* fix js files

* take out the trash

* fix 3.9

* uno mas

* fix fixture

* ruff

* Update const.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-03-28 16:49:32 +02:00
Guido Schmitz a26d95ec02
Add switch tests for devolo_home_control (#80154) 2023-03-28 16:45:06 +02:00
Maikel Punie 0eb409cff1
Add support for select entities in velbus (#87568)
* Add support for select entities in velbus

* Implement comments

* EntityCategory is now in homeassistant.const

* more comments
2023-03-28 08:01:31 -04:00
Aaron Bach ff135ecdc6
Add a calendar entity to Ridwell (#88108)
* Subclass a `DataUpdateCoordinator` for Ridwell

* Add a calendar entity to Ridwell

* Simpler unique ID

* Fix tests

* Docstring
2023-03-28 09:31:36 +02:00
Renat Sibgatulin e27d3c9523
Improve airq handling of DeviceInfo (#90232)
* Reduce data sharing between ConfigFlow and DataUpdateCoordinator

Instead of fetching device information from the device once in
`ConfigFlow` and then piping it through in `ConfigEntry.data`,
only use as much as needed in `ConfigFlow.async_step_user`, then fetch
again in `AirQCoordinator._async_update_data` if a key is missing.

Additionally, factor `AirQCoordinator` out into a sumbodule.

Add a simple test for `AirQCoordinator.device_info` update.

Positive side effect: `AirQCoordinator.device_info` is
updated explicitly, instead of dumping the entire content of (a fully
compatible) `TypedDict`, retrieved from `aioairq`.

* Remove tests ill-suited to this PR

`test_config_flow.test_duplicate_error` slipped through by mistake,
while `test_coordinator.test_fetch_device_info_on_first_update` may need
a more thoroughly suite of accompanying tests

* Ignore airq/coordinator.py

...newly separated from airq/__init__.py, that's already in this list

* Reorder files alphabetically
2023-03-28 08:18:47 +02:00
Michael 00ce757051
Apply late review comments from #89396 in Nextcloud (#90327) 2023-03-27 00:10:57 +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
G Johansson 53726cb4a1
Remove Magicseaweed (#90277) 2023-03-25 22:02:10 -04:00
Felix Rotthowe 0bb0b4bfc5
Add livisi window sensor (WDS) (#90220)
* Added support for livisi window sensor

* Add const strings

* added postpix for device_id

* Remove unnecessary import

* Fix imports

* Fix lint errors, remove redundant device class property

* Format code

* Update .coveragerc

* Finish basic window door sensor support

* currently, only one binary sensor (wds) is supported

* Remove unused imports

* Fix isort issue

* Simplify code as suggested in PR

* rename get_device_response to get_device_state

* fix ruff issue

* Be more defensive in interpreting what we get from aiolivisi

* Simplify coordinator

* remove window sensor specific code (isOpen)

* parameter order, type hinta

* Update homeassistant/components/livisi/coordinator.py

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

* Update homeassistant/components/livisi/coordinator.py

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

* Update homeassistant/components/livisi/coordinator.py

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

* Update homeassistant/components/livisi/binary_sensor.py

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

* Update homeassistant/components/livisi/binary_sensor.py

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

* Update homeassistant/components/livisi/binary_sensor.py

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

---------

Co-authored-by: Tecotix <78791840+Tecotix@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-24 14:52:50 +01:00
puddly c581116c82
ZHA network settings API (#88564)
* Rename `zha.api` to `zha.websocket_api`

* Implement a ZHA network settings API

* Use the enum name as the radio type

* Don't filter out ignored config entries

* [WIP] Start unit tests

* Add unit tests

* Rename ZHA websocket API module in `.coveragerc`

* Rename `api` to `websocket_api`

* Increase test coverage to 100%
2023-03-22 11:15:46 -04:00
MarkGodwin 41b4c5532d
Add Update entities to TP-Link Omada integration (#89562)
* Bump tplink-omada

* Add omada firmware updates

* Excluded from code coverage

* Fixed entity name
2023-03-12 21:26:34 -04: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
starkillerOG 2d3c5cf8ee
Reolink test init 100% (#89112)
* Split out reolink tests

* Bring __init__ coverage to 100%

* Improve docstrings

* Use patching and autospec=True for ReolinkHost

* Use fixture

* fix styling

* Parametrize tests

* Update tests/components/reolink/conftest.py

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

* Apply suggestions from code review

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

* Update test_config_flow.py

* convert to fixture

* review comments

* Update tests/components/reolink/conftest.py

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

* Update tests/components/reolink/conftest.py

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

* Update tests/components/reolink/conftest.py

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

* fix tests

* fix imports

* Update test_init.py

* Check if host is logout on reload

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-07 20:29:38 +01:00
starkillerOG 76cc4c9c08
Add Reolink light platform (#88619)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-03-06 12:48:36 +01:00
starkillerOG b14c5046e2
Reolink add select platform (#87946)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-03-05 23:43:58 +01:00
starkillerOG c792631f15
Add Reolink siren platform (#88217)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-03-05 21:21:22 +01:00
starkillerOG b2c9208dd0
Reolink add switch platform (#87943)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-03-05 21:00:51 +01:00
starkillerOG 39db0ef173
Add Reolink button platform (#88687)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-03-05 13:01:10 +01:00
Felix Rotthowe 3a34f818e8
Refactor Livisi Switch and Climate to inherit from a common base class (#89085)
* Refactor Livisi entities to inherit from a common base class

* Add livisi_entity to .coveragerc

* Device location can be None

* Add use_room_as_device_name argument to constructor of LivisiEntity

When initializing, set entity name attribute only if device name differs (i.e. use_room_as_device_name=True).

* re-add comment for special handling of climate device names

* Add explicit type to constructur argument

* Make use_room_as_device_name a keyword only arg

* rename livisi_entity.py to entity.py

* change livisi_entity.py to entity.py in coveragerc

* Code quality improvements as suggested in PR

* sort .coveragerc

* fix isort issue

* fix all isort issues
2023-03-03 15:23:38 +01:00
Emory Penney 1cb1dfa456
Add Obihai reboot button (#88849)
* Obihai: Add reboot service

* Switch to button

* Remove button.py from coverage

* Update homeassistant/components/obihai/const.py

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

* Update homeassistant/components/obihai/button.py

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

* Update homeassistant/components/obihai/button.py

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

* PR Feedback

* Cleanup some typehints

* As a class attr

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-03 07:31:56 +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 137d2f0d73
Obihai config flow fixes (#88853)
* Commit split issue

* Clearer name

* Add yaml_failure test case

* Not sure why this is failing now

* Update homeassistant/components/obihai/strings.json

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

* PR Feedback

* Update homeassistant/components/obihai/config_flow.py

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

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-01 16:33:32 +01:00
Chuck Deal 09d0128601
Add diagnostics to VeSync (#86350)
* Add diagnostics to VeSync

* Create unit tests for diagnostics and init

* Improved diagnostic test coverage

* Peer review fixes

* Fixed Peer Review comments

* Updated based on Peer Review

* Additional diagnostic redactions

* Removed account_id from diagnostic output
2023-02-28 22:12:48 -05: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
StefanIacobLivisi 10bf910f88
Add support for LIVISI climate devices (#86691)
* Add support for LIVISI climate devices

* Remove the reauthentication logic

* Add support for LIVISI climate devices

* Remove the reauthentication support

* Code review follow-up

* Update homeassistant/components/livisi/manifest.json

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

* Update homeassistant/components/livisi/manifest.json

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

* Code review follow-up

* Code Review Follow-up

* Code Review Follow-up

* Code review follow-up

* Code review follow-up

* Code review follow-up

* Code review follow-up

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-02-27 10:38:52 +01:00
starkillerOG f97b50f762
Add Reolink update entity (#87865) 2023-02-22 16:26:12 +01:00
Jorgen Evens 4e32b65694
Improve pjlink reliability (#80745)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-02-21 16:48:53 +01:00
mletenay 60ca3b3223
Extract goodwe data update coordinator to a separate module (#88396)
* Extract coordinator to separate module

* Make field protected and replace cast
2023-02-21 08:14:12 +01:00
Aaron Bach 6bb7a7225d
Revert "Add a calendar entity to Ridwell (#86117)" (#88106)
This reverts commit 16a5275461.
2023-02-14 10:23:32 -07:00
Aaron Bach 16a5275461
Add a calendar entity to Ridwell (#86117) 2023-02-14 06:58:41 -07:00
Erik Montnemery ee6886dabd
Add dormakaba_dkey door and dead bolt binary sensors (#87990)
* Add dormakaba_dkey door and dead bolt binary sensors

* Rename dead bolt sensor

* Fix docstring

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-02-14 11:55:58 +01:00
Erik Montnemery 575f7c4205
Add dormakaba_dkey battery sensor (#87975)
* Add dormakaba_dkey battery sensor

* Update .coveragerc

* Apply suggestion from code review

* Update .coveragerc
2023-02-13 11:09:23 +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
Kevin Worrel 687d326bb4
Support local push updates for most ScreenLogic entities (#87438)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-02-06 20:13:36 -06: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
Nathan Spencer 11ccd166fe
Use pybalboa 1.0.0 (#87214)
* Use pybalboa 1.0.0

* Code changes per PR review
2023-02-05 19:10:35 +01:00
starkillerOG 4c1147e62b
Reolink add number platform (#87217)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-02-03 19:29:27 +01:00
On Freund 35b82db8b0
Rympro integration code fixes (#86734)
* Address review comments

* Add coordinator.py to coveragerc

* Apply suggestions from code review

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

* Update homeassistant/components/rympro/coordinator.py

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

* Move SCAN_INTERVAL to coordinator.py

---------

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2023-01-31 10:40:43 +01:00
Robert Hillis b69576d6de
Add D-link tests (#86825)
* Fix D-Link config flow auth

* Add tests to D-Link

* pyupgrade
2023-01-27 22:15:27 -05:00
Franck Nijhof 021ac84405
Add recorder platform to required test category (#86704) 2023-01-26 11:03:56 +01:00
epenet b2004e62b1
Remove ability to ignore coverage violations (#86597)
* Remove ability to ignore coverage violations

* Adjust codecov for required platforms

* Update codecov.yml
2023-01-25 14:27:16 +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
epenet c3c290b576
Remove files with coverage > 97% from ignore list (#86466)
* Test coverage - no-ignore

* Remove helpers/typing and scripts/auth

* Remove files with coverage > 99%

* Remove files with coverage > 98%

* Remove files with coverage > 97%

* Remove duplicates
2023-01-24 17:31:23 +01:00
epenet 15ab04f97d
Prevent wilcard coverage ignore if tests exist (#86455) 2023-01-23 16:33:57 +01:00
starkillerOG 7e51aeb916
Reolink add binary sensors (#85654)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-01-20 22:27:59 +01: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
930913 4f63398941
Add sensor platform to LD2410BLE (#85276)
* Add sensor platform to LD2410BLE

- Add platform
- Add moving target distance entity
- Add static target distance entity
- Add moving target energy entity
- Add static target energy entity

* Add detection distance entity

* Align bluetooth-data-tools version

* Generate sensors from description

Also add state_class and unfactor description lambdas.

* Optimise LD2410BLE collections

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-18 14:56:06 -05:00
Aaron Bach 27359dfc89
Subclass a `DataUpdateCoordinator` for Ridwell (#85644) 2023-01-17 19:31:00 +01: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
shbatm a81045653d
Add Insteon ramp rate select entities to ISY994 (#85895)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-14 17:37:07 -10:00
shbatm 28bea53afe
Move ISY994 data to dataclass and remove bad entities (#85744) 2023-01-12 13:09:04 -10:00
Jack Boswell 43cc8a1ebf
Add binary_sensor to Starlink (#85409)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-11 17:18:54 -10:00
Robert Hillis 3d7c61bbed
Add D-Link config flow (#84927) 2023-01-10 14:10:56 -10:00
shbatm d3249432c9
Add ISY994 variables as number entities (#85511)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-10 12:29:11 -10:00
Aaron Bach 5d7f33ad76
Further generalize base Ridwell entity (#85486) 2023-01-10 12:15:28 +01:00
Jeef 6970a8a87a
Add IntelliFire lights (#79816) 2023-01-09 12:16:39 -10:00
Rami Mosleh a0e18051c7
Add config flow to imap (#74623)
* Add config flow to imap

fix coverage

fix config_flows.py

* move coordinator to seperate file, remove name key

* update intrgations.json

* update requirements_all.txt

* fix importing issue_registry

* Address comments

* Improve handling exceptions on intial connection

* exit loop tasks properly

* fix timeout

* revert async_timeout

* Improve entity update handling

* ensure we wait for idle to finish

* fix typing

* Update deprecation period

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-09 11:41:47 +01:00
Xavier Decuyper fc00c6d885
Add Nuki battery percentage sensor (#84968)
* Nuki: add battery percentage + add to device registry

* Remove unused import

* Fixing linting and sorting issues

* Update homeassistant/components/nuki/sensor.py

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* Shorthand for adding entities

* Use _attr_has_entity_name for battery sensor

* Fix linting issue

* Remove device registry changes

* Exclude from coverage

* Use _attr_ instead of properties

* Clean up

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-08 14:24:20 +01:00
Jack Boswell 3ad4caa3d7
Add Starlink Integration (#77091)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-07 10:13:37 -10:00
shbatm d2537dacc6
Add beep button entity to ISY994 Insteon devices (#85367)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-07 09:40:34 -10:00
epenet 52032c6c7f
Complete test coverage for SFR Box (#85068)
* Complete test coverage for SFR Box

* Add missing hint

* renault -> sfr_box

* Fixes following rebase
2023-01-06 12:30:07 +01:00
930913 2507ec1f4b
Add LD2410 BLE integration (#83883) 2023-01-05 16:15:03 -10:00
Aarni Koskela 38f183a683
Ruuvi Gateway integration (#84853)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-03 10:19:43 -10:00
Koen van Zuijlen 6349760a2c
Zeversolar integration (#84887)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-01-03 20:14:08 +01:00
amitfin b5664f9eaf
Bump pycoolmasternet-async and add coolmaster swing mode (#82809)
* Add filter and error code support to CoolMastetNet

* Create separate entities

* coolmaster swing_mode support

* Changed default to False

* Raise HomeAssistantError

* Add tests for init and climate

* Fixed bad merge

* Catch only ValueError
2023-01-03 10:21:11 -08:00
epenet 34798189ca
Improve SFR Box test coverage (#85054)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-03 17:56:30 +01:00
Joakim Plate b302d1f3fc
Add initial test for nibe buttons (#84950) 2023-01-02 20:24:20 +01:00
epenet 896526c24b
Add SFR Box integration (#84780)
* Add SFR Box integration

* Adjust error handling in config flow

* Add tests

* Use value_fn

* Add translation

* Enable mypy strict typing

* Add ConfigEntryNotReady

* Rename exception

* Fix requirements
2022-12-31 10:14:13 +01:00
Joakim Plate af875eec50
Add nibe heat pump alarm reset button (#79427)
* Add button platform

* Enable button platform

* Use parameters from library
2022-12-28 15:36:41 +01:00
Damian Sypniewski 599569bc53
Add support for SwitchBot Lock (#84673)
* Added support for SwitchBot Lock

* Updated PySwitchbot to 0.32.1

* Updated .coveragerc

* Removed unnecessary condition

* Using library method to verify encryption key

* Added config flow tests

* Remove link from config flow description

* Added one more test for config flow

* Updated CODEOWNERS
2022-12-27 18:16:00 -10:00
starkillerOG a06b1eaf69
Add reolink IP NVR/Camera integration (#84081)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-12-27 10:15:53 -10:00
Martin Hjelmare dea513cdbd
Add mysensors light tests (#84606) 2022-12-27 15:25:22 +01:00
Martin Hjelmare 941d175087
Add mysensors device tracker tests (#84589) 2022-12-26 12:58:13 -10:00
Martin Hjelmare 101118a60e
Add mysensors binary sensor tests (#84580) 2022-12-26 20:19:15 +01:00
Allen Porter 490d2cfb71
Move Rainbird to async client library (#84417)
* Bump pyrainbird to 0.7.0 and move to async library

* Share updates across sensors

* Fix test version and delete dead code

* Add test coverage for yaml configuration

* Address PR feedback
2022-12-22 13:00:17 -08:00
Martin Hjelmare 6a8d9a91cb
Fix matter websocket reconnect (#84192) 2022-12-20 13:06:24 +01:00
Daniel Gangl 8ca92254b6
Correct zamg config flow comments (#81369)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
fixes undefined
2022-12-20 11:47:32 +01:00
Franck Nijhof 5651f4a3fe
Remove Deutsche Bahn integration (#84236) 2022-12-19 21:43:28 +01:00
Alberto Geniola ecdbddc1fa
Elmax/alarm_control_panel (#75365) 2022-12-18 09:12:43 -07:00
Martin Hjelmare f29024795b
Clean up matter adapter (#84144) 2022-12-17 23:44:19 +01:00
muppet3000 186e3a6d98
Re-add missing Growatt TLX values (#84040)
* Growatt - Re-adding missing TLX values (#81470)

* Growatt - Added missing files to .coveragerc

* Growatt - Correcting TLX Voltage types

* Growatt - Addressing review comments
2022-12-16 15:31:49 +01:00
Aaron Bach e64973c7cc
Add PurpleAir integration (#82110) 2022-12-12 20:32:11 -07:00
Aaron Bach 3d4ee5906d
Add integration for AirVisual Pro (#79770)
* Add integration for AirVisual Pro

* Tests

* A few more redactions

* Loggers

* Consistency

* Remove unnecessary f-string

* Use `entry.as_dict()` in diagnostics

* One call

* Integration types

* Cleanup

* Import cleanup

* Code review

* Code review

* Code review
2022-12-12 14:28:27 -07:00
J. Nick Koston 642cefb035
Add MVP humidifier support to switchbot (#83696)
* Add MVP humidifier support to switchbot

changelog: https://github.com/Danielhiversen/pySwitchbot/compare/0.22.0...0.23.0

* Update homeassistant/components/switchbot/config_flow.py

* bump

* coveragerc

* Revert "coveragerc"

This reverts commit eb642f6543.

* fix dirty branch
2022-12-10 13:56:57 -05:00
Guido Schmitz 500b00bd66
Add sensor tests for devolo_home_control (#74292) 2022-12-08 20:40:45 +02:00
Jevgeni Kiski d62bdbb9ff
Add vallox fan speed control (#82548)
* fan.set_percentage + tests

* let's see what is not yet covered

* Apply suggestions from code review

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

* tests fix

* vallox_websocket_api 3.0.0

* more coverage

* test coverage

* Update tests/components/vallox/test_fan.py

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

* raise exceptions on user input

* Supported features are different per preset mode.

* Test fixes

* Static supported features is back.

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-12-06 11:00:59 +01:00
Aaron Bach cd0037a780
Fix OpenUV coverage (#83203) 2022-12-03 14:40:42 -07:00
Marcel van der Veldt e2308fd15c
Add matter integration BETA (#83064)
* Add matter base (#79372)

Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>

* Add matter server add-on flow (#82698)

* Add matter server add-on flow

* Fix stale error argument

* Clean docstrings

* Use localhost as default address

* Add matter websocket api foundation (#82848)

* Add matter config entry add-on management (#82865)

* Use matter refactored server/client library (#83003)

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

* Bump python-matter-server to 1.0.6 (#83059)

* Extend matter websocket api (#82948)

* Extend matter websocket api

* Finish docstring

* Fix pin type

* Adjust api after new client

* Adjust api to frontend for now

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-12-01 20:44:56 +01:00
Joakim Plate 9f236c4ca5
Add nibe heat pump climate entities (#78952)
* Add climate platform

* Enable climate plarform

* Some adjustments after review

* fixup! Add climate platform

* Rename description to avoid confusion

* No need to pass None

* Rename with nibe prefix

* Handle possible translations of values

* Make sure we prune None contexts

* Switch to constants from library
2022-12-01 01:58:59 +01:00
Christopher McCurdy 4167edc52d
Create a UUID from given LG soundbar device name (#81918)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Fixes https://github.com/home-assistant/core/issues/77524
fixes undefined
2022-11-30 12:53:49 +01:00
Robert Hillis 8a1805fa89
Add Do Not Disturb sensor to Slack (#72380) 2022-11-27 15:31:38 -05:00
Shay Levy 1e68e8c4b4
Add Shelly tests coverage (#82642)
* Add Shelly tests coverage

* Review comments

* Remove leftovers
2022-11-24 20:07:19 +02:00
Franck Nijhof 285aff154d
Remove Google Chat/Hangouts integration (#82645) 2022-11-24 18:33:13 +01:00
Matrix 95cbf7cca7
Add yolink Dimmer support (#81970)
* Add yolink Dimmer support

* suggest change

* fix suggest

* fix suggest

* fix suggest
2022-11-23 16:27:51 +01:00
Shay Levy 4a089b5c28
Add tests coverage for Shelly climate platform (#82529) 2022-11-22 09:04:55 -06:00
epenet 9d192643ee
Move PluggableAction to trigger helpers (#81900)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Joakim Plate <elupus@ecce.se>
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-11-22 11:35:18 +01:00
Shay Levy 91a44b697b
Add tests coverage for Shelly number platform (#82480) 2022-11-21 10:55:06 -06:00
Shay Levy 32f3eb722e
Add tests coverage for Shelly entity (#82432)
* Add tests coverage for Shelly entity

* Make it generator expression
2022-11-20 23:59:25 +02:00
Shay Levy 8bd7f59b93
Add tests for Shelly sensor platform (#82385) 2022-11-19 22:01:30 +02:00
Shay Levy ea98f0e9e8
Add tests for Shelly binary_sensor platform (#82367)
* Add tests for Shelly binary_sensor platform

* Rename create to register for
2022-11-19 18:07:02 +02:00
G Johansson 48f6c9a486
Add tests DNS IP (#82059) 2022-11-13 18:23:14 -06:00
J. Nick Koston b7533aff48
Replace led-ble util with bluetooth-data-tools (#81093) 2022-11-08 07:26:16 -06:00
Nyro ddbfed354e
Add Overkiz AtlanticPassAPCDHW (#78665)
* Add Overkiz AtlanticPassAPCDHW

* Remove unnecessary line

* Improve atlantic pass_apcdhw for operation and target temprature

* Remove async_execute_commands

* Fix small code issues for Overkiz AtlanticPassAPCDHW

* Update homeassistant/components/overkiz/const.py

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>

* Update homeassistant/components/overkiz/water_heater_entities/atlantic_pass_apc_dhw.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Update homeassistant/components/overkiz/water_heater_entities/atlantic_pass_apc_dhw.py

Co-authored-by: Quentame <polletquentin74@me.com>

* Fix small issues

Co-authored-by: Mick Vleeshouwer <mick@imick.nl>
Co-authored-by: Quentame <polletquentin74@me.com>
2022-11-04 10:42:58 +01:00
Renat Sibgatulin dd5baa6e48
Add air-Q integration (air quality sensors) (#76999)
* Added initial files for air-Q integration

* Allow FIXME comments in pylint (temporary)

Also reintroduce --ignore-missing-annotations=y

* Set up air-q entry to connect to aioairq's API (initial attempt)

Also add necessary constants

* Implement a class for sensors and its update logic

Very early stage, WIP

* Zeroconf and authentication are working

* Complete the bare-bone minimal working version

Specifically, make AirQSensor update its values.

* Handle invalid authentication gracefully

* Handle ClientConnectionError gracefully

* Add field hint for the login form

The key in the schema, which defines the form in
`ConfigFlow.async_show_form` is looked up in both `airq/strings/json`
and `airq/translations/en.json`. I am still not 100% sure how this
lookup is performed. WIP

* Minor cleanups

* Extend sensor list to all supported by SensorDeviceClass

Also manage warming up sensors

* aioairq is published to PyPI and mentioned in requirements

* Reordered constants and list content alphabetically

As required by style guides. Also turned SENSOR_TYPES to a list

* Updated file docstrings for a dev unfamiliar w/homeassistant like myself

* Adding a bit of logging for the integration setup process

* Expose scan interval & smoothing flag

Also streamline test_authentication in config_flow.

* Fix a type annotation mistake

* Use as many constants from homeassistant.const as possible

My only concern is using CONST_IP_ADDRESS = "ip_address" for smth which
stands for both IP address and mDNS...

* Temporarily rollback ConfigFlow.async_step_configure and use defaults

TODO: implement OptionFlowHandler instead

* Define custom Coordinator, w subset of airq config

The latter is then accessed from entity / sensor constructors to define
correct DeviceInfo

* Provide translations to de & fr + minor changes to en

* Provide translations to ru + a minor en changes

* Make translation a little more helpful and polite

* Fix devicename and entry title

* Remove stale commented out code

* Test config_flow

At this point two helper functions which interact with the external
library are not tested

* Clean up unrelated and meant as temporary changes

* Clean up unnecessary comments meant for internal use

* Move fetching config to a dedicated async coordinator method

As opposed to it being a potentially poorly justified step in
async_setup_entry

* Remove zeroconf support since it is not yet ready

* Remove translations other than en

* Remove unnecessary comments, manifest.json entries, and constants

* Improve exception handling

- `_LOGGER` uses `debug` and not `error` levels.
- Drop `ClientConnect` and catch `aiohttop.ClientConnectError` directly
- Drop `Exception` as it is not expected from `aioairq` (remove the
  corresponding test too)

* Drop strings for obsolete errors and steps

Specifically, `unknown` error isn't caught any more. `configure` step
has also been removed.

* Refactor en.json to be consistent with strings.json

* Move target_route from a coordinator argument to a constant

At this point a user cannot configure the target_route route, thus it
does not make sense to expose it half-heartedly in
`AirQCoordinator.__init__`, since it cannot be accessed.

* Fix an async call in `AirQCoordinator.async_setup_entry`

* Refactor underlying aioairq API

- Use `homeassistant.helpers.aiohttp.async_get_clientsession` and pass a
  single persistent session to `aioariq.AirQ.__init__`
- `aioairq.AirQ.fetch_device_info` now returns a `DeviceInfo` object heavily
  inspired and almost compatible with `homeassistant.helpers.entity.DeviceInfo`.
  Make heavier use of this object and define a single `DeviceInfo` in the
  `AirQCoordinator` (instead of recreating the same object for each sensor
  of the device in `sensor.AirQSensor`)
- Drop two helper functions in `config_flow.py` and operate on `aioariq.AirQ`
  methods directly

* Fix the version of aioairq

* Add 15 more sensors + icons

* Remove cnt* & TypPS, change units of health & performance

* Add 12 more sensors

* Add a missing icon

* Gracefully handle device not being available on setup

If the device and the host are not on the same WiFi,
ServerTimeoutError is raised, which is caught by
ClientConnectionError.
If the device is powered off, ClientConnectionError is expected.
In both cases, ConfigEntryNotReady is raised, as prescribed by the docs.
Newer version of aioairq times-out far quicker than the default 5 mins.

* Rename two sensors

* Validate provided IP address / mDNS

aioairq now raises InvalidInput if provided IP / mDNS does not seem
valid. Handle this exception correctly

* Apply suggestions from code review

Clean up the comments and rename the logger

Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Artem Draft <Drafteed@users.noreply.github.com>

* Only fetch device info during the first refresh

- Fetched info is stored in AirQCoordinator.device_info.
- In `AirQSensor.native_value` only multiply by the factor if
  the sensor reading is not None
- Fix the tests for ConfigFlow for aioairq==0.2.3. Specifically
  make the dummy data pass the new validation step upstream
  + add a test which fails it

* Drop custom device classes for now

* Apply suggestions from code review

Co-authored-by: Artem Draft <Drafteed@users.noreply.github.com>

* Only fetch device info during ConfigFlow.async_step_user

Store the result obtained by `airq.fetch_device_info` it in
`config_entry.data`. Pass the entire config entry to `AirQCoordinator`
and build the entire `homeassistant.helpers.entity.DeviceInfo` in the
`AirQCoordinator.__init__`. This makes
`AirQCoordinator._async_fetch_device_info` and overloaded
`AirQCoordinator._async_config_entry_first_refresh` obsolete.

Bump aioairq version.

Turn update_interval from `AirQCoordinator.__init__` argument into a
contestant.

* Custom entity description exposing a hook to modify sensor value

Use a `AirQEntityDescription` with a callable `value_fn` which allows to
change the sensor value retrieved from the device. Note that the
callable does not handle data retrieval itself (even from
`coordinator.data`). Instead it is purely a hook to transform obtained
value.

* Avoid duplicated use of unique_id

Device info is fetched  during the `ConfigFlow.async_user_step`.
`unique_id` is taken from the device info and is **not** stored
in `config_entry.data`. Subsequently `config_entry.unique_id` is
used instead.

* Drop unnecessary try-except

Co-authored-by: Artem Draft <Drafteed@users.noreply.github.com>

* Clarify the use of value_transform_fn

* Refactor the use of lambdas in AirQEntityDescription

Now it is the job of the callable under `value` to get the sensor
reading from the coordinator's data. Factoring this functionality into a
callback decouples  the key of the description from the key of dict,
returned by the API, so `AirQEntityDescription` no longer requires its key
to be set to smth clearly internal (e.g. `nh3_MR100`).

* Use a callback to update native_value

Since all `native_value`s are updated synchronously, it can as well be
done in a callback for better state consistency (right?)

* Revert the description keys to match data keys

Must match given the current way of identifying available sensors. On a
broader scale, they must match to be able to relate the descriptions to
sensors, unless a separate lookup table is maintained.

* Reduce number of loops when adding sensors

Filtering warming up sensors and non-sensor keys can be combined with
adding entities.

* Remove obsolete imports

* Update integrations.json

* Add integration_type

Integration supports multiple devices => hub

Co-authored-by: dl2080 <daniel.lehmann@runbox.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Artem Draft <Drafteed@users.noreply.github.com>
Co-authored-by: Daniel Lehmann <43613560+dl2080@users.noreply.github.com>
Co-authored-by: Martin Selbmann <job@martin-selbmann.de>
2022-11-03 23:13:57 +01:00
Rami Mosleh 328eda044a
Use DataUpdateCoordinator for glances (#72748)
* use DataUpdateCoordinator for glances

add tests to increase coverage

fix test_config_flow.py

fix codecov/patch

remove unused const, minor tweaks

remove invalid_auth test as it is not implemented

fix type hints

* change to async_forward_entry_setups

* Use Dataupdatecoordinator for glances

* minor fixex

* minor fixes

* minor fix

* remove support_versions const

* coe cleanup

* address comments

* fix sensor native_value

* Rename entry to entry_data in `get_api`

* Remove whitespace in sensor name
2022-11-03 10:02:25 +01:00
Rami Mosleh fc3843f5e2
Add config flow to `pushbullet` (#74240)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-11-02 16:11:44 +01:00
Daniel Gangl b2b3c47917
Add config flow to zamg (#66469) 2022-10-26 18:35:12 +02:00
Øyvind Matheson Wergeland 712b984833
Support Nobø Switch as temperature sensor (#78480)
* Expose Nobø Switch as temperatur sensor.

* - Review
- Hub may report current temperature as None

* Avoid update during entity addition, and fix race condition

* Update pynobo to 1.6.0
Use new method to fix potential race condition.

* Use generator expressions
2022-10-24 01:55:22 +02:00
Shay Levy 228d491216
Fix Shelly entry unload and add tests for init (#80760) 2022-10-22 09:00:35 +02:00
Willem-Jan van Rootselaar 1fe397f7d7
Update bsblan integration (#67399)
* Update bsblan integration

Update the integration to current standards

* removed unused code

update coverage

* some cleanup

* fix conflicts due upstream changes

* fix prettier json files

* fix remove comment code

* use dataclass instead of tuple

* fix spelling

* Set as class attribute

main entity doesn't need to give own name

* fix requirements
2022-10-18 12:06:51 +02:00