Commit Graph

2509 Commits (78e5f9578c3d007870956ee98c862715e53e7b25)

Author SHA1 Message Date
osohotwateriot cf3e758aa1
Move OSO Energy base entity class to separate module (#118563)
Move base entity class to separate file
2024-05-31 16:13:20 +02:00
Diogo Gomes 822273a6a3
Add support for V2C Trydan 2.1.7 (#117147)
* Support for firmware 2.1.7

* add device ID as unique_id

* add device ID as unique_id

* add test device id as unique_id

* backward compatibility

* move outside try

* Sensor return type

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

* not needed

* make slave error enum state

* fix enum

* Update homeassistant/components/v2c/sensor.py

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

* Update homeassistant/components/v2c/strings.json

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

* Update homeassistant/components/v2c/strings.json

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

* simplify tests

* fix misspellings from upstream library

* add sensor tests

* just enough coverage for enum sensor

* Refactor V2C tests (#117264)

* Refactor V2C tests

* fix rebase issues

* ruff

* review

* fix https://github.com/home-assistant/core/issues/117296

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-30 20:42:48 +02:00
Maciej Bieniek cf51179009
Add tests for Tractive integration (#118470)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-30 12:45:11 +02:00
swcloudgenie a670169325
New official genie garage integration (#117020)
* new official genie garage integration

* move api constants into api module

* move scan interval constant to cover.py
2024-05-29 16:13:28 -04:00
G Johansson 13ebc6fb0e
Add more tests to Yale Smart Alarm (#116501) 2024-05-29 10:34:20 +02:00
osohotwateriot 1c2cda5033
Add OSO Energy binary sensors (#117174) 2024-05-29 08:36:20 +02:00
Ludovic BOUÉ f44dfe8fef
Add Matter fan platform (#111212)
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
2024-05-28 12:24:58 +02:00
Erwin Douna fb95b91507
Add DSMR Reader tests (#115808)
* Add DSMR Reader sensor tests

* Change to paramatization

* Removing patch

* Emulate the test

* Go for 100% test coverage

* Adding defintions.py

* Add myself as code owner to keep improving
2024-05-28 10:42:21 +02:00
dontinelli 2a8fc7f310
Add Fyta sensor tests (#117995)
* Add test for init

* update tests

* split common.py into const.py and __init__.py

* Update tests/components/fyta/__init__.py

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

* add autospec, tidy up

* adjust len-test

* add test_sensor.py, amend tests for coordinator.py

* Update tests/components/fyta/conftest.py

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

* move load_unload with expired token into own test

* Update tests/components/fyta/test_init.py

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

* ruff change

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-27 12:01:11 +02:00
Angel Nunez Mencias b85cf36a68
Upgrade thethingsnetwork to v3 (#113375)
* thethingsnetwork upgrade to v3

* add en translations and requirements_all

* fix most of the findings

* hassfest

* use ttn_client v0.0.3

* reduce content of initial release

* remove features that trigger errors

* remove unneeded

* add initial testcases

* Exception warning

* add strict type checking

* add strict type checking

* full coverage

* rename to conftest

* review changes

* avoid using private attributes - use protected instead

* simplify config_flow

* remove unused options

* review changes

* upgrade client

* add types client library - no need to cast

* use add_suggested_values_to_schema

* add ruff fix

* review changes

* remove unneeded comment

* use typevar for TTN value

* use typevar for TTN value

* review

* ruff error not detected in local

* test review

* re-order fixture

* fix test

* reviews

* fix case

* split testcases

* review feedback

* Update homeassistant/components/thethingsnetwork/__init__.py

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

* Update homeassistant/components/thethingsnetwork/__init__.py

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

* Update tests/components/thethingsnetwork/test_config_flow.py

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

* Remove deprecated var

* Update tests/components/thethingsnetwork/test_config_flow.py

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

* Remove unused import

* fix ruff warning

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-26 16:30:33 +02:00
Christian Neumeier ee38099a91
Add tests to Zeversolar integration (#117928) 2024-05-24 22:18:29 +02:00
epenet 6a10e89f6d
Exclude gold and platinum integrations from .coveragerc (#117563) 2024-05-24 16:10:22 +02:00
epenet d4df86da06
Move TibberDataCoordinator to separate module (#118027) 2024-05-24 11:05:54 +02:00
epenet 95840a031a
Move nuki coordinator to separate module (#117975) 2024-05-24 10:55:26 +02:00
epenet 39f618d5e5
Add snapshot tests to nuki (#117973) 2024-05-24 10:36:59 +02:00
Evgeny 24d31924a0
Migrate OpenWeaterMap to new library (support API 3.0) (#116870)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-23 21:51:10 -10:00
epenet 8da799e420
Move omnilogic coordinator to separate module (#118014) 2024-05-24 08:48:05 +02:00
epenet 4ee1460eec
Move moehlenhoff_alpha2 coordinator to separate module (#117970) 2024-05-23 21:06:00 +02:00
epenet 6b2ddcca5e
Move rainmachine coordinator to separate module (#117983)
* Move rainmachine coordinator to separate module

* Coverage
2024-05-23 16:41:50 +02:00
epenet bc51a4c524
Add snapshot tests to moehlenhoff_alpha2 (#117967)
* Add tests to moehlenhoff_alpha2

* Adjust coverage

* Adjust coverage

* Adjust coverage

* Adjust patch

* Adjust
2024-05-23 11:54:20 +02:00
dontinelli 6682244abf
Improve fyta tests (#117661)
* Add test for init

* update tests

* split common.py into const.py and __init__.py

* Update tests/components/fyta/__init__.py

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

* add autospec, tidy up

* adjust len-test

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-23 10:51:30 +02:00
Michael 6d3cafb43b
Move entity definitions into own module in AVM Fritz!Tools (#117701)
* move entity definitions into own module

* merge entity description mixin

* add entity.py to .coveragerc
2024-05-18 22:25:25 +02:00
epenet 4dad9c8859
Move plenticore coordinators to separate module (#117491) 2024-05-18 13:11:22 +02:00
epenet a904557bbb
Move philips_js coordinator to separate module (#117561) 2024-05-18 10:21:22 +02:00
Christopher Tremblay b015dbfccb
Add AlarmDecoder device info (#117357)
* Update AlarmDecoder component to newer model

This commit makes AlarmDecoder operate as a proper device entity following the new model introduced a few years ago.

Code also has an internal dependency on a newer version of adext (>= 0.4.3) which has been updated correspondingly.

* Created AlarmDecoder entity

Added an alarmdecoder entity so the device_info can be re-used across the integration

* Move _attr_has_entity_name to base entity

As per code review suggestion, clean up the object model.

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

* Missed one suggestion with the prior commit

Moves _attr_has_entity_name to base entity

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

* Address some ruff issues

* Apply additional ruff cleanups

Ran ruff again to clean up a few files tat weren't picked up last time

* Apply suggestions from code review

Some additional cleanup of style & removal of unnecessary code

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

* Properly generated the integration file

generation had to happen twice for this to work.  Now that it's generated, I'm including the missing update.

* Apply suggestions from code review

Use local client variable instead of self._client

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

* Sort the manifest

documentation was added, but it wasn't sorted properly in the key/value pairs

* Add alarmdecoder entity file to coverage ignore file

Added the alarmdecoder entity file so it is ignored for coverage

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-05-18 08:59:44 +02:00
epenet a29a0a36e5
Move elmax coordinator to separate module (#117425) 2024-05-17 16:02:19 +02:00
epenet eacbebce22
Prevent `const.py` in coverage ignore list (#117625) 2024-05-17 12:53:58 +02:00
epenet 407d0f88f0
Rename openweathermap coordinator module (#117609) 2024-05-17 08:05:11 +02:00
Joost Lekkerkerker 68b7302cdc
Add Poolsense platform tests (#117579) 2024-05-16 21:35:00 +02:00
epenet c2bf4b905c
Move surepetcare coordinator to separate module (#117544) 2024-05-16 11:44:36 +02:00
epenet 2cd9bc1c2c
Move xbox coordinator to separate module (#117421) 2024-05-16 09:10:41 +02:00
epenet 0a625baeed
Rename fritz coordinator module (#117440)
* Rename fritz coordinator module

* Update .coveragerc

* Adjust .coveragerc

* Adjust coverage

* Adjust coverage
2024-05-15 21:58:29 +02:00
epenet aa2485c7b9
Move vallox coordinator to separate module (#117503)
* Move vallox coordinator to separate module

* Move logic into coordinator class

* Adjust
2024-05-15 21:01:21 +02:00
Marlon 3604a34823
Post review comments on APsystems (#117504)
* Cleanup for apsystems and fix for strings

* Migrate to typed ConfigEntry Data for apsystems

* Improve strings for apsystems

* Improve config flow tests for apsystems by cleaning up fixtures

* Do not use Dataclass for Config Entry Typing

* Improve translations for apsystems by using sentence case and removing an apostrophe

* Rename test fixture and remove unnecessary comment in tests from apsystems

* Remove default override with default in coordinator from apsystems
2024-05-15 19:56:12 +02:00
epenet 4e600b7b19
Move venstar coordinator to separate module (#117500) 2024-05-15 15:18:26 +02:00
epenet 6c892b227b
Rename mikrotik coordinator module (#117488) 2024-05-15 12:02:33 +02:00
Erik Montnemery e6296ae502
Revert "Add Viam image processing integration" (#117477) 2024-05-15 09:20:40 +02:00
Marlon d4d30f1c46
Add integration for APsystems EZ1 microinverter (#114531)
* Add APsystems local API integration

* Fix session usage in config_flow in apsystems local api

* Remove skip check option for apsystems_loca api

* Update APsystems API dependency and increased test coverage to 100%

* Utilize EntityDescriptions for APsystems Local integration

* Ensure coverage entries are sorted (#114424)

* Ensure coverage entries are sorted

* Use autofix

* Adjust

* Add comment to coverage file

* test CI

* revert CI test

---------

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

* Use patch instead of Http Mocks for APsystems API tests

* Fix linter waring for apsystemsapi

* Fix apsystemsapi test

* Fix CODEOWNERS for apsystemsapi

* Address small PR review changes for apsystems_local

* Remove wrong lines in coveragerc

* Add serial number for apsystems_local

* Remove option of custom refresh interval fro apsystems_local

* Remove function override and fix stale comments

* Use native device id and name storage instead of custom one for apsystems_local

* Use runtime_data for apsystems_local

* Don't store entry data in runtime data

* Move from apsystems_local to apsystems domain

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-05-14 22:50:25 -04:00
Nick Hehr 55bf0b6647
Add Viam image processing integration (#101786)
* feat: scaffold integration, configure client

* feat: register services, allow API key auth flow

* feat: register detection, classification services

* test(viam): add test coverage

* chore(viam): update viam-sdk version

* fix(viam): add service schemas and translation keys

* test(viam): update config flow to use new selector values

* chore(viam): update viam-sdk to 0.11.0

* feat: add exceptions translation stings

* refactor(viam): use constant keys, defer filesystem IO execution

* fix(viam): add missing constants, resolve correct image for services

* fix(viam): use lokalize string refs, resolve more constant strings

* fix(viam): move service registration to async_setup

* refactor: abstract services into separate module outside of manager

* refactor(viam): extend common vol schemas

* refactor(viam): consolidate common service values

* refactor(viam): replace FlowResult with ConfigFlowResult

* chore(viam): add icons.json for services

* refactor(viam): use org API key to connect to robot

* fix(viam): close app client if user abort config flow

* refactor(viam): run ruff formatter

* test(viam): confirm 100% coverage of config_flow

* refactor(viam): simplify manager, clean up config flow methods

* refactor(viam): split auth step into auth_api & auth_location

* refactor(viam): remove use of SelectOptionDict for auth choice, update strings

* fix(viam): use sentence case for translation strings

* test(viam): create mock_viam_client fixture for reusable mock
2024-05-14 13:35:56 +02:00
Federico D'Amico 746cfd3492
Add climate platform to microBees (#111152)
* Add climate platform to microBees

* add list comprehension

* fixes

* fixes

* fixes

* fix multiline ternary

* use a generator expression instead of filter + lambda.

* bug fixes

* Update homeassistant/components/microbees/climate.py

---------

Co-authored-by: Marco Lettieri <m.lettieri@microbees.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-14 12:11:19 +02:00
Laurence Presland c3f95a4f7a
Implement support for SwitchBot Meter, MeterPlus, and Outdoor Meter (#115522)
* Implement support for SwitchBot MeterPlus

Add temperature, humidity, and battery sensor entities for the MeterPlus device

* Rename GH username

* Update homeassistant/components/switchbot_cloud/coordinator.py

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

* Refactor to use EntityDescriptions

Concat entity ID in SwitchBotCloudSensor init

* Remove __future__ import

* Make scan interval user configurable

* Add support for Meter and Outdoor Meter

* Revert "Make scan interval user configurable"

This reverts commit e256c35bb7.

* Remove device-specific default scan intervals

* Update homeassistant/components/switchbot_cloud/sensor.py

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

* Update homeassistant/components/switchbot_cloud/sensor.py

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

* Update homeassistant/components/switchbot_cloud/sensor.py

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

* Fix ruff errors

* Reorder manifest keys

* Update CODEOWNERS

* Add sensor.py to coveragerc

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-13 15:18:28 +02:00
Jan Bouwhuis a1bc929421
Migrate Tibber notify service (#116893)
* Migrate tibber notify service

* Tests and repair flow

* Use notify repair flow helper

* Cleanup strings after using helper, use HomeAssistantError

* Add entry state assertions to unload test

* Update comment

* Update comment
2024-05-12 19:52:08 +02:00
Kevin Worrel c1f0ebee2c
Add screenlogic service tests (#116356) 2024-05-09 07:19:58 -05:00
Jake Martin 6e024d54f1
Add Monzo integration (#101731)
* Initial monzo implementation

* Tests and fixes

* Extracted api to pypi package

* Add app confirmation step

* Corrected data path for accounts

* Removed useless check

* Improved tests

* Exclude partially tested files from coverage check

* Use has_entity_name naming

* Bumped monzopy to 1.0.10

* Remove commented out code

* Remove reauth from initial PR

* Remove useless code

* Correct comment

* Remove reauth tests

* Remove device triggers from intial PR

* Set attr outside constructor

* Remove f-strings where no longer needed in entity.py

* Rename field to make clearer it's a Callable

* Correct native_unit_of_measurement

* Remove pot transfer service from intial PR

* Remove reauth string

* Remove empty fields in manifest.json

* Freeze SensorEntityDescription and remove Mixin

Also use list comprehensions for producing sensor lists

* Use consts in application_credentials.py

* Revert "Remove useless code"

Apparently this wasn't useless

This reverts commit c6b7109e47202f866c766ea4c16ce3eb0588795b.

* Ruff and pylint style fixes

* Bumped monzopy to 1.1.0

Adds support for joint/business/etc account pots

* Update test snapshot

* Rename AsyncConfigEntryAuth

* Use dataclasses instead of dictionaries

* Move OAuth constants to application_credentials.py

* Remove remaining constants and dependencies for services from this PR

* Remove empty manifest entry

* Fix comment

* Set device entry_type to service

* ACC_SENSORS -> ACCOUNT_SENSORS

* Make value_fn of sensors return StateType

* Rename OAuthMonzoAPI again

* Fix tests

* Patch API instead of integration for unavailable test

* Move pot constant to sensor.py

* Improve type safety in async_get_monzo_api_data()

* Update async_oauth_create_entry() docstring

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-07 20:38:58 +02:00
G Johansson b3008b074e
Remove ambiclimate integration (#116410) 2024-05-06 22:15:04 +02:00
Mr. Bubbles b53081dc51
Add update coordinator for Habitica integration (#116427)
* Add DataUpdateCoordinator and exception handling for service

* remove unnecessary lines

* revert changes to service

* remove type check

* store coordinator in config_entry

* add exception translations

* update HabiticaData

* Update homeassistant/components/habitica/__init__.py

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

* Update homeassistant/components/habitica/sensor.py

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

* remove auth exception

* fixes

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-05 17:02:28 +02:00
Joost Lekkerkerker a2bd045c9d
Improve coordinator in Ondilo ico (#116596)
* Improve coordinator in Ondilo ico

* Improve coordinator in Ondilo ico
2024-05-02 15:57:47 +02:00
Manuel Dipolt 2beab34de8
Add sensor platform to romy integration (#112388)
* poc romy status sensor working

* poc romy adc sensor working

* code review changes

* code review changes base enitity.py see branch romy_binary_sensor

* code review change: move CoordinatorEntity to the base class

* code review changes: sensors disabled per default

* code review: icons.json added

* checkout main entity.py

* code review changes: sensors enabled per default again

* disable rssi sensor per default

* Update homeassistant/components/romy/strings.json

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

* code review changes

* code review changes

* code review changes

* pylint fix

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-24 17:06:46 +02:00
Manuel Dipolt 220dc1f125
Add binary sensor platform to romy integration (#112998)
* wip

* poc working, reworked to a binary sensor list

* Update homeassistant/components/romy/binary_sensor.py

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

* Update homeassistant/components/romy/binary_sensor.py

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

* Update homeassistant/components/romy/binary_sensor.py

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

* Update homeassistant/components/romy/binary_sensor.py

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

* Update homeassistant/components/romy/binary_sensor.py

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

* code review changes, adjust translation key names

* code review clean up: removed unecessary RomyBinarySensorEntityDescription

* code review changes: translation names

* code review changes, put DeviceInfo into RomyEntity

* code review change: change docked icon to type plug

* code review change: move CoordinatorEntity to the base class

* code review changes: sensors disabled per default

* code review: icons.json added

* code review changes: sensors enabled per default again

* checkout main entity.py

* type hinting changes

* Update homeassistant/components/romy/binary_sensor.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-24 15:59:09 +02:00
osohotwateriot 44208a5be0
Add OSO Energy sensors (#108226)
* Add OSO Energy sensors

* Fix comments

* Fixes after review

* Fix sensor names and translations

* Fixes after review

* Fix validation errors

* Fixes after review

* Remove profile sensor
2024-04-24 08:19:26 +02:00