Commit Graph

2239 Commits (0d013767ee498bafcb8fbe5d8a6a59dc28603e52)

Author SHA1 Message Date
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
kingy444 5ead3b2605
Powerview Add Battery Option Selection (#80166)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-10-17 11:30:33 -05:00
Jeef ff2d762f55
Intellifire - Number Entity - Flame Height Control (#79901)
* Adding flame height control

* oops

* addressing comments

* fix coverage file

* addressing PR comments
2022-10-15 12:43:47 -06:00
Franck Nijhof e3a3f93441
Add full test coverage to LaMetric (#80134) 2022-10-11 22:54:49 +02:00
Austin Brunkhorst 7d097d18b0
Add support for Snooz BLE devices (#78790)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-10-10 13:14:27 -10:00
Chris Talkington 7fae85ee85
Add tests for Jellyfin init (#79968) 2022-10-10 00:29:37 -05:00
Shay Levy 9019fcb5c5
Migrate Shelly to use kelvin for color temperature (#79880) 2022-10-08 22:24:19 +03:00
Franck Nijhof 90d39a414c
Add LaMetric number tests (#79748) 2022-10-07 08:11:10 +02:00
Jeef 22d6ce967d
Add Flume binary sensors (#77327)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-10-06 15:09:38 -10:00
Maikel Punie 0eb1101de8
Velbus split of entity in its own file (#79653)
* Velbus split of entity in its own file

* Update coveragerc
2022-10-05 17:03:23 +02:00
Shay Levy 8faecae34d
Shelly - move coordinators to coordinator.py (#79616) 2022-10-04 22:29:07 +03:00
Jafar Atili e8650dd4b7
Add climate platform to switchbee integration (#78385)
* Added Climate platform to switchbee integration

* uploaded missing file

* Applied code review feedback from other PR

* Addressed comments from previous PRs

* fixed misspell error

* fixed mistake in the code

* added type hints

* fixes

* fixes

* Update homeassistant/components/switchbee/climate.py

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

* Update homeassistant/components/switchbee/entity.py

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

* Update homeassistant/components/switchbee/climate.py

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

* Update homeassistant/components/switchbee/climate.py

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

* Update homeassistant/components/switchbee/climate.py

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

* Update homeassistant/components/switchbee/climate.py

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

* Update homeassistant/components/switchbee/climate.py

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

* Update homeassistant/components/switchbee/climate.py

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

* fixes

* Update homeassistant/components/switchbee/climate.py

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

* fixes

* Update homeassistant/components/switchbee/climate.py

* Update homeassistant/components/switchbee/climate.py

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

* more fixes

Co-authored-by: Shay Levy <levyshay1@gmail.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-10-03 21:34:02 +03:00
Vincent Giorgi d5b966d942
Add Airthings BLE component (#77284)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-09-29 15:55:45 -04:00
Jafar Atili 75510b8e90
Add cover platform for switchbee integration (#78383)
* Added Platform cover for switchbee integration

* added cover to .coveragerc

* Applied code review feedback from other PR

* Addressed comments from other PRs

* rebased

* Re-add carriage return

* Update homeassistant/components/switchbee/cover.py

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

* Update homeassistant/components/switchbee/cover.py

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

* Update homeassistant/components/switchbee/cover.py

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

* Update homeassistant/components/switchbee/cover.py

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

* addressed CR comments

* fixes

* fixes

* more fixes

* more fixes

* separate entities for cover and somfy cover

* fixed isort

* more fixes

* more fixes

* Update homeassistant/components/switchbee/cover.py

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

* Update homeassistant/components/switchbee/cover.py

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

* more fixes

* more fixes

* more

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-09-29 15:03:39 +02:00
J. Nick Koston 7042d6d35b
Add ESPHome BleakClient (#78911)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-09-28 08:06:30 -10:00
Jafar Atili de3a1f444c
Add light platform for switchbee integration (#78382)
* Added Light platform for switchbee integration

* added light to .coveragerc

* Applied code review feedback from other PR

* Fixes based on previous reviewes

* fixed small mistake

* added test coverage for light

* aligned code with other PR

* rebased

* fixes

* removed unecessary changes

* Update homeassistant/components/switchbee/light.py

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

* Update homeassistant/components/switchbee/light.py

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

* more fixes

* more fixes

* adjusting switch with the new change

* more fixes

* Update homeassistant/components/switchbee/light.py

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

* Update homeassistant/components/switchbee/light.py

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

* Update homeassistant/components/switchbee/light.py

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

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-09-28 16:30:33 +02:00
Yuxin Wang 52307708c8
Refactor apcupsd to use config flow (#64809)
* Add Config Flow to APCUPSd integration and remove YAML support.

* Hide the binary sensor if user does not select STATFLAG resource.

* Add tests for config flows.

* Simplify config flow code.

* Spell fix.

* Fix pylint warnings.

* Simplify the code for config flow.

* First attempt to implement import flows to suppport legacy YAML configurations.

* Remove unnecessary log calls.

* Wrap synchronous update call with `hass.async_add_executor_job`.

* Import the YAML configurations when sensor platform is set up.

* Move the logger call since the variables are not properly set up.

* Add codeowner.

* Fix name field of manifest.json.

* Fix linting issue.

* Fix incorrect dependency due to incorrect rebase.

* Update codeowner and config flows via hassfest.

* Postpone the deprecation warning to 2022.7.

* Import future annotations for init file.

* Add an newline at the end to make prettier happy.

* Update github id.

* Add type hints for return types of steps in config flow.

* Move the deprecation date for YAML config to 2022.12.

* Update according to reviews.

* Use async_forward_entry_setups.

* Add helper properties to `APCUPSdData` class.

* Add device_info for binary sensor.

* Simplify config flow.

* Remove options flow strings.

* update the tests according to the changes.

* Add `entity_registry_enabled_default` to entities and use imported CONF_RESOURCES to disable entities instead of skipping them.

* Update according to reviews.

* Do not use model of the UPS as the title for the integration.

Instead, simply use "APCUPSd" as the integration title and let the device info serve as title for each device instead.

* Change schema to be a global variable.

* Add more comments.

* Rewrite the tests for config flows.

* Fix enabled_by_default.

* Show friendly titles in the integration.

* Add import check in `async_setup_platform` to avoid importing in sensor platform setup.

* Add import check in `async_setup_platform` to avoid importing in sensor platform setup.

* Update comments in test files.

* Use parametrize instead of manually iterating different test cases.

* Swap the order of the platform constants.

* Avoid using broad exceptions.

* Set up device info via `_attr_device_info`.

* Remove unrelated test in `test_config_flow`.

* Use `DeviceInfo` instead of dict to assign to `_attr_device_info`.

* Add english translation.

* Add `async_create_issue` for deprecated YAML configuration.

* Enable UPS status by default since it could show "online, charging, on battery etc" which is meaningful for all users.

* Apply suggestions from code review

* Apply suggestion

* Apply suggestion

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-09-28 09:14:04 +02:00
J. Nick Koston 8eaa22cf90
Break out esphome domain data (#79134) 2022-09-27 07:56:00 -10:00
Joakim Plate f463b22053
Add nibe heat pump switch entities (#78943)
* Add switch platform

* Enable switch platform

* Drop unneeded variable
2022-09-26 14:46:43 +02:00
Joakim Plate 92e9e7fb6c
Add nibe heat pump number entities (#78941)
* Add number platform

* Enable number platform

* Adjust typing

* Update homeassistant/components/nibe_heatpump/number.py

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

* Fix format

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-09-26 10:40:11 +02:00
Jeef b617d2bab0
IntelliFire Fan Support (#74181)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-09-25 23:24:46 -04:00
Tom Puttemans 7aa53feff4
Add config flow and MQTT autodiscover to dsmr_reader integration (#71617)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-09-25 23:15:50 -04:00
Joakim Plate f8d42e9246
Add nibe heat pump select entities (#78942) 2022-09-25 20:57:14 -04:00
Robert Hillis 42bd664305
Add diagnostic sensor to Radarr (#79044)
* Add diagnostic sensor to Radarr

* coverage
2022-09-25 16:11:53 +02:00
Raman Gupta ef30ebd9e1
Stop ignoring test coverage in zwave_js (#79049) 2022-09-25 07:32:59 -04:00
epenet 26d9962fe5
Add base entity to switchbee (#78987)
* Add base entity to switchbee

* Adjust coverage

* Add SwitchBeeDeviceEntity

* Don't move available

* Update homeassistant/components/switchbee/entity.py

Co-authored-by: Joakim Plate <elupus@ecce.se>

* Update homeassistant/components/switchbee/entity.py

Co-authored-by: Joakim Plate <elupus@ecce.se>

Co-authored-by: Joakim Plate <elupus@ecce.se>
2022-09-23 22:34:49 +02:00
Artem Draft ab4c1ebfd6
Add Button platform to Bravia TV (#78093)
* Add Button platform to Bravia TV

* Add button.py to coveragerc

* improve callable type
2022-09-23 15:39:24 +02:00
Aaron Bach 48744bfd68
Replace RainMachine freeze protection temperature sensor with a select (#76484)
* Migrate two RainMachine binary sensors to config-category switches

* Removal

* Replace RainMachine freeze protection temperature sensor with a select

* Fix CI

* Show options in current unit system

* Have message include what entity is replacing this sensor

* Don't define a method for every dataclass instance

* Add issue registry through helper

* Breaking change -> deprecation

* Naming

* Translations

* Remove extraneous list

* Don't swallow exception

* Don't be prematurely defensive

* Better Repairs instructions
2022-09-22 13:19:33 -06:00
Joakim Plate e46180ee76
Add binary sensor platform to Nibe Heatpump (#78927)
* Add binary_sensor platform

* Enable binary_sensor platform

* Add binary_sensor to coveragerc

* Apply suggestions from code review

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-09-22 17:57:20 +02:00
Jafar Atili c97817bb0e
Add Button platform to switchbee integration (#78386)
* Added Button platform to switchbee integration

* fixed review comments

* Addressed CR comments

* Update homeassistant/components/switchbee/button.py

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

* Update homeassistant/components/switchbee/button.py

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

* Update homeassistant/components/switchbee/button.py

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

* removed the zone name from the entity name

* Re-add space

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-09-22 14:20:32 +02:00
Joakim Plate f5120872aa
Support for nibe heat pumps with local access (#78542)
* Add nibe local integration

* Add sensor platform

* Enable sensor platform

* Fix manifest

* Correct domain after rename

* Adjust tests for rename

* Correct codeowners

* Add requirements for tests

* Grab coil by name

* Switch to home assistant error

* Config entry always exist

* Switch to create task

* Bump to 0.5.0

* Use new coils access

* Remove unneeded check

* Use single instance of logger

* Test invalid ip

* Don't allow coil to be None

* Remove sleep

* Initialize data in coordinator init

* Add utils to ignore

* Update homeassistant/components/nibe_heatpump/manifest.json

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

* Use generator instead

* Use tenacity as retry decorator

* Use package instead of name to get logger

* Skip broad exception handling

* Catch missing coil exception

* Add missing test

Co-authored-by: J. Nick Koston <nick@koston.org>
2022-09-22 08:43:30 +02:00
spycle 0e0318dc53
Add Keymitt BLE integration (#76575)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-09-21 15:44:37 -10:00
Franck Nijhof 166160e2b5
Add LaMetric button tests (#78754) 2022-09-21 13:57:40 +02:00
Aaron Bach e265848b63
Remove deprecated Flu Near You integration (#78700) 2022-09-21 11:24:21 +02:00
Robert Hillis 2a2cc79fc3
Add Lidarr integration (#66438) 2022-09-20 11:51:29 -04:00
Franck Nijhof 36eda3801d
Add LaMetric integration init tests (#78679) 2022-09-19 11:11:05 +02:00
Aaron Bach b4356a432e
Replace SimpliSafe `clear_notifications` service with a button (#75283)
* Replace SimpliSafe `clear_notifications` service with a button

* Better log message

* Coverage

* Docstring

* Add repairs item

* Better repairs strings

* Mark issue as fixable

* Add issue registry through helper

* Update deprecation version
2022-09-16 16:41:17 -06:00
Jafar Atili 491177e5d3
Address late review of SwitchBee (#78412) 2022-09-16 14:19:50 +02:00
Franck Nijhof 6678f660a8
Remove U.S. Citizenship and Immigration Services (USCIS) integration (#78432)
* Remove U.S. Citizenship and Immigration Services (USCIS) integration

* Update .coveragerc

Fix due to sorting in https://github.com/home-assistant/core/pull/78447

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-09-14 21:51:24 +03:00
epenet db44be7054
Sort coveragerc (#78447) 2022-09-14 12:26:22 +02:00
jafar-atili 24266f1426
Add SwitchBee Integration (#70201)
* Add SwitchBee Integration

* fixes

* improved API and more logs

* fixed test_config_flow code

* removed light and cover

* Fixed CR comments, updated pylib, improved response time and lowered the scan interval for lower latency

* CR fixes, added advanced setup form to let the
user choose the following:
    - scan interval in seconds: default 5
    - whether to expose scenarios and group switches from the CU or not

* used SCAN_INTERVAL_SEC instead of typing just the number

* Fixed PR comments, added unit tests

* fixes

* Improved the pypi and updated the code accordingly

* Add SwitchBee Integration

* fixes

* improved API and more logs

* fixed test_config_flow code

* removed light and cover

* Fixed CR comments, updated pylib, improved response time and lowered the scan interval for lower latency

* CR fixes, added advanced setup form to let the
user choose the following:
    - scan interval in seconds: default 5
    - whether to expose scenarios and group switches from the CU or not

* used SCAN_INTERVAL_SEC instead of typing just the number

* Fixed PR comments, added unit tests

* fixes

* Improved the pypi and updated the code accordingly

* fixes

* restored new line in .coveragerc

* test: increased config_flow test coverage

* removed two way type

* Updated CODEOWNERS

* fix: code review comments

* fixed review comments

* added device_info

* moved device info to attribute
2022-09-13 09:01:29 +02:00
epenet 5276d849ec
Improve type hints in apple_tv media player (#77940) 2022-09-08 10:46:23 +02:00