Commit Graph

77 Commits (fe5cd5c55c89f5a4b1d56a7b4a59743907b10983)

Author SHA1 Message Date
J. Diego Rodríguez Royo cc18ec2de8
Fix fetch options error for Home connect (#139392)
* Handle errors when obtaining options definitions

* Don't fetch program options if the program key is unknown

* Test to ensure that available program endpoint is not called on unknown program
2025-02-27 12:00:14 +01:00
J. Diego Rodríguez Royo 42f55bf271
Small improvements to Home Connect strings and icons (#139386)
* Small improvements to Home Connect strings and icons

* Fix test
2025-02-26 21:02:00 +01:00
J. Diego Rodríguez Royo 5be7f49146
Improve Home Connect oven cavity temperature sensor (#139355)
* Improve oven cavity temperature translation

* Fetch cavity temperature unit

* Handle generic Home Connect error

* Improve test clarity
2025-02-26 18:11:40 +01:00
J. Diego Rodríguez Royo 8644fb1887
Add missing Home Connect context at event listener registration for appliance options (#139292)
* Add missing context at event listener registration for appliance options

* Add tests
2025-02-25 23:05:52 +01:00
J. Diego Rodríguez Royo b86bb75e5e
Add missing exception translation to Home Connect (#139218)
Add missing exception translation
2025-02-24 23:25:24 +01:00
J. Diego Rodríguez Royo 1cd82ab8ee
Deprecate Home Connect command actions (#139093)
* Deprecate command actions

* Improve issue description

* Improve issue description

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-23 16:18:20 +01:00
J. Diego Rodríguez Royo 6ebda9322d
Fetch allowed values for select entities at Home Connect (#139103)
Fetch allowed values for enum settings
2025-02-23 13:54:02 +01:00
J. Diego Rodríguez Royo 5b0eca7f85
Add select setting entities to Home Connect (#138884)
* Add select setting entities

* Improvements
2025-02-23 01:42:25 +01:00
J. Diego Rodríguez Royo 98c6a578b7
Add buttons to Home Connect (#138792)
* Add buttons

* Fix stale documentation
2025-02-22 21:14:11 +01:00
J. Diego Rodríguez Royo 92788a04ff
Add entities that represent program options to Home Connect (#138674)
* Add program options as entities

* Use program options constraints

* Only fetch the available options on refresh

* Extract the option definitions getter from the loop

* Add the option entities only when it is required

* Fix typo
2025-02-22 21:08:39 +01:00
J. Diego Rodríguez Royo 8e887f550e
Add connectivity binary sensor to Home Connect (#138795)
Add connectivity binary sensor
2025-02-18 22:08:40 +01:00
J. Diego Rodríguez Royo c75707ec79
Use correct inputs for relative time and duration options (#138619) 2025-02-16 00:29:38 +01:00
J. Diego Rodríguez Royo 78c4d815ce
Fix home connect coffe-milk ratio option (#138593)
* Fix home connect milk ratio option

* Use enumeration instead of number selector for coffee-milk ratio
2025-02-15 20:10:27 +01:00
J. Diego Rodríguez Royo 2bfe96dded
Add Home Connect action with recognized programs and options (#130662)
* Added recognized options to Home Connect actions

* Fix ruff

* Fix strings.json

* Fix dishwasher typo

* Improved test_bsh_key_transformations

* Add missing return types

* Added descriptions

* Remove custom options

* Fixes

* Merge the 4 services (select, start, set options for active or selected program)

And deprecate the original ones

* Delete stale snapshots

* Clean up logic after service validation

* Make deprecated actions issues fixable

And delete issue on entry unload

* Fixes and improvements

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

* Improvements

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

* Fix name and descriptions

* Add `affects_to` to strings and service.yaml

* Add missing periods at strings

* Fix

Co-authored-by: Norbert Rittel <norbert@rittel.de>

* Add tests to check if the flow removes the deprecated action issue

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Norbert Rittel <norbert@rittel.de>
2025-02-14 20:21:01 +01:00
J. Diego Rodríguez Royo 4a8c96471b
Raise `ConfigEntryAuthFailed` at Home Connect update auth error (#136953)
* Raise `ConfigEntryAuthFailed` on `UnauthorizedError` handling

* Implement reauth flow

* Add tests

* Remove unnecessary code from tests
2025-02-09 12:36:08 +01:00
J. Diego Rodríguez Royo 91dbe3092f
Only allow single Home Connect config entry (#137088)
* Make Home Connect config entry unique

* Use unique ID for Home connect config entry

* Remove unnecessary code

* Revert "Use unique ID for Home connect config entry"

This reverts commit 4241317469.

* Added tests
2025-02-08 16:29:00 +01:00
J. Diego Rodríguez Royo 30314ca32b
Add and delete Home Connect devices on CONNECTED/PAIRED and DEPAIRED events (#136952)
* Add and delete devices on CONNECT/PAIRED and DEPAIRED events

* Simplify device depairing

* small fixes

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

* Add always the devices

* kind of revert changes

to simplify the entity fetch and removing on connected/paired and depaired

* cache `ha_id`

* Fix typo

* Remove unnecessary device info at HomeConnectEntity

* Move common code of each platform to `common.py`

* Added docstring to clarify usage

* Apply suggestions

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-02 02:02:45 +01:00
J. Diego Rodríguez Royo 147b5f549f
Fetch current active and selected programs at Home Connect (#136948)
* Fetch current active and selected programs

* Intialize HomeConnectEntity first at SelectProgramEntity

* Use the right exception

* Use active/selected program from `get_all_programs`

This will allow us to reduce the number of requests that we need to perform to get all the data ready (only one requests vs. three requests)

* Remove no longer required mocks

* Fix
2025-02-02 00:12:26 +01:00
J. Diego Rodríguez Royo 63ab13681a
Home Connect entities availability based on the connected state of the appliance (#136951)
* Base the entity availability on the connected state of the appliance

* cache `ha_id`

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

* Inlcude coordinator `available` property at entity

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-01 12:46:49 +01:00
J. Diego Rodríguez Royo efcfd97d1b
Filter programs by execution type at select program entities at Home Connect (#136950)
* Filter programs by execution type at select program entities

* Suggestions and improvements

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

* Use function and translation key at select program entity description

* Fix select entity description docstring

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-01 12:06:39 +01:00
J. Diego Rodríguez Royo 285a0a6c81
Fix Home Connect actions keys (#137027)
* Fix actions

* Use coerce

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-01 10:47:27 +01:00
J. Diego Rodríguez Royo 4d4e11a0eb
Fetch all programs instead of only the available ones at Home Connect (#136949)
Fetch all programs instead of only the available ones
2025-01-31 08:26:57 +01:00
J. Diego Rodríguez Royo b637129208
Migrate from homeconnect dependency to aiohomeconnect (#136116)
* Migrate from homeconnect dependency to aiohomeconnect

* Reload the integration if there is an API error on event stream

* fix typos at coordinator tests

* Setup config entry at coordinator tests

* fix ruff

* Bump aiohomeconnect to version 0.11.4

* Fix set program options

* Use context based updates at coordinator

* Improved how `context_callbacks` cache is invalidated

* fix

* fixes and improvements at coordinator

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

* Remove stale Entity inheritance

* Small improvement for light subscriptions

* Remove non-needed function

It had its purpose before some refactoring before the firs commit, no is no needed as is only used at HomeConnectEntity constructor

* Static methods and variables at conftest

* Refresh the data after an event stream interruption

* Cleaned debug logs

* Fetch programs at coordinator

* Improvements

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

* Simplify obtaining power settings from coordinator data

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

* Remove unnecessary statement

* use `is UNDEFINED` instead of `isinstance`

* Request power setting only when it is strictly necessary

* Bump aiohomeconnect to 0.12.1

* use raw keys for diagnostics

* Use keyword arguments where needed

* Remove unnecessary statements

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-01-30 02:42:41 +01:00
epenet b43379be7d
Standardize `helpers.xxx_registry` imports (#136688)
Standardize registry imports
2025-01-28 08:48:34 +01:00
J. Diego Rodríguez Royo 57294fa461
Do not base power switch state on appliance's operation state at Home Connect (#135932) 2025-01-19 20:24:48 +01:00
J. Diego Rodríguez Royo 67e2379d2b
Iterate over a copy of the list of programs at Home Connect select setup entry (#134684) 2025-01-06 15:21:02 +01:00
J. Diego Rodríguez Royo c06bc53724
Deprecate Home Connect program switches (#131641) 2024-12-18 14:26:37 +01:00
J. Diego Rodríguez Royo a6520d2627
Handle Home Connect error at diagnostics (#131644) 2024-12-18 10:52:45 +01:00
J. Diego Rodríguez Royo 0d0ef6bf03
Add exception handlers to Home Connect action calls (#131895)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-12-06 22:58:13 +01:00
J. Diego Rodríguez Royo 8c6a24c368
Use HomeAssistant error in the right cases (#131923)
* Use the correct exceptions

* Improved exception strings
2024-11-29 22:11:15 -05:00
J. Diego Rodríguez Royo c2d6599736
Home connect program select entities (#126157)
* Home connect selector for programs

* Mark program switches as deprecated

* Simplified translation keys

* Improvements for program select entity

* Revert mark program switches as deprecated

* Return `None` if program is `None` or empty string

* Fix program format

* Use `is` instead of `==`

* Program selector entity selects program instead of start the selected program

* Fix typo

* Active and selected program

* Added ServiceValidationError

* Delete unnecessary `service` param at tests

* Use full program keys

* Fix again typos in programs states

* Use map for translations

* Add error handling for when the selected program is not registered on the program map

* Reverse map for programs and translation keys

* Remove stale string

* Log only once that the program is not part of the official Home Connect API specification

* pop programs

* Move `RE_CAMEL_CASE` to a better place

* Added warning if updated program is not valid

* Stale test function name

* Improve log about unknown program at update

* Add underscore before numbers in translation keys

* Added suggested changes

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

* Use target for adding an executor job

* Apply suggestions from code review

* Clean whitespace

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-11-27 16:34:41 +01:00
J. Diego Rodríguez Royo 53b87f47fb
Fix Home Connect service validation error placeholders (#131294) 2024-11-22 19:28:08 +01:00
J. Diego Rodríguez Royo 7fba788f18
Use `ConfigEntry.runtime_data` to store runtime data at Home Connect (#131014)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-11-22 15:25:22 +01:00
J. Diego Rodríguez Royo 1ab2bbe3b0
Don't save Home Assistant device ID at Home Connect device (#131013) 2024-11-21 20:45:43 +01:00
J. Diego Rodríguez Royo 80e8b8d61b
Add diagnostics per device to Home Connect (#131010)
* Add diagnostics per device to Home Connect

* Include programs at device diagnostics

* Applied suggestions from epenet

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

* Applied more suggestions from epenet

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

* Test naming consistency

Co-authored-by: abmantis <amfcalt@gmail.com>

* Add return type to `_generate_entry_diagnostics`

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: abmantis <amfcalt@gmail.com>
2024-11-20 22:01:57 +01:00
J. Diego Rodríguez Royo 85610901e0
Add programs to Home Connect diagnostics (#131011) 2024-11-20 09:09:50 +01:00
Johnny Willemsen a6094c4cce
Add diagnostics to HomeConnect (#130500)
Co-authored-by: J. Diego Rodríguez Royo <jdrr1998@hotmail.com>
Co-authored-by: Joostlek <joostlek@outlook.com>
2024-11-18 13:01:07 +01:00
J. Diego Rodríguez Royo 0430e6794e
Delete binary door deprecation issue on unload at Home Connect (#129947) 2024-11-06 14:44:17 +01:00
J. Diego Rodríguez Royo 080e3d7a42
Removed stale translation and improved `set_setting` translation at Home Connect (#129878) 2024-11-05 15:17:03 +01:00
J. Diego Rodríguez Royo f194a689cc
Fetch power off state for Home Connect appliances' power switch (#129289) 2024-10-29 13:56:45 +01:00
J. Diego Rodríguez Royo 0e959b3019
Added deprecation to binary door sensor at Home Connect (#129245)
Co-authored-by: Joostlek <joostlek@outlook.com>
2024-10-29 12:46:39 +01:00
J. Diego Rodríguez Royo 668626b920
Add ServiceValidationError to Home Connect (#129309)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-10-28 16:48:56 +01:00
J. Diego Rodríguez Royo 2acad4a78c
Home connect number platform with temperature set points entities (#126145) 2024-10-26 14:04:52 +02:00
J. Diego Rodríguez Royo 275bbc81f0
Add Time platform with alarm clock to Home Connect (#126155)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-10-26 11:42:51 +02:00
J. Diego Rodríguez Royo a948c7d69d
Door entity as enum sensor at Home Connect (#126158) 2024-10-25 18:18:21 +02:00
J. Diego Rodríguez Royo a77cb1e579
Home connect light generalization and RGB support (#126144) 2024-10-25 15:08:50 +02:00
J. Diego Rodríguez Royo 6a12a24d73
Migrate device models to entity descriptions and add localization & icons at Home Connect (#127870)
* Delete device models and use entity descriptions

* Home Connect localization & icons

* Update homeassistant/components/home_connect/strings.json

* Update homeassistant/components/home_connect/icons.json

* Fix tests

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-10-11 17:52:06 +02:00
J. Diego Rodríguez Royo 0d795aad16
Use BSH keys as unique ID's suffix at Home Connect (#126143)
* Use BSH keys as as unique id suffix instead of the simple description

* Update tests/components/home_connect/test_init.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-10-06 12:40:13 +02:00
Robert Contreras 4d04402ad4
Add Home Connect light entity for cooling appliances (#126090)
* Add Home Connect light entities for fridge

* Update homeassistant/components/home_connect/light.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-17 15:56:20 +02:00
Robert Contreras 85aa32338e
Add Home Connect sensors for fridge door states and alarms (#125490)
* New sensors for Fridge door states and alarms

* Move 2 option entities to binary_sensor, tests

* Change state translations

* Fix stale docstring
2024-09-13 19:31:35 +02:00