Commit Graph

75 Commits (e15eda3aa26bad430a437b4efb42d7efa4472784)

Author SHA1 Message Date
Erik Montnemery ecb3bf79f3
Revert "Add support for subentries to config entries" (#133470)
Revert "Add support for subentries to config entries (#117355)"

This reverts commit ad15786115.
2024-12-18 13:51:05 +01:00
Erik Montnemery ad15786115
Add support for subentries to config entries (#117355)
* Add support for subentries to config entries

* Improve error handling and test coverage

* Include subentry_id in subentry containers

* Auto-generate subentry_id and add optional unique_id

* Tweak

* Update tests

* Fix stale docstring

* Address review comments

* Typing tweaks

* Add methods to ConfigEntries to add and remove subentry

* Improve ConfigSubentryData typed dict

* Update test snapshots

* Adjust tests

* Fix unique_id logic

* Allow multiple subentries with None unique_id

* Add number of subentries to config entry JSON representation

* Add subentry translation support

* Allow integrations to implement multiple subentry flows

* Update translations schema

* Adjust exception text

* Change subentry flow init step to user

* Prevent creating a subentry with colliding unique_id

* Update tests

* Address review comments

* Remove duplicaetd unique_id collision check

* Remove change from the future

* Improve test coverage

* Add default value for unique_id
2024-12-12 20:16:18 +01:00
Álvaro Fernández Rojas ebd1baa42c
Add Airzone switch entities to zones (#124562) 2024-10-21 16:33:22 +02:00
Álvaro Fernández Rojas 4c1b7add39
Update aioairzone to v0.9.4 (#127792) 2024-10-11 12:39:39 +02:00
Erik Montnemery d82bff1bc2
Index config entry discovery_keys by discovery domain (#126563)
* Index config entry discovery_keys by discovery domain

* Add new signal

* Update tests

* Update homeassistant/config_entries.py

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

* Fix imports

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-23 21:48:11 +02:00
Erik Montnemery b2982c18bb
Reinitialize zeroconf discovery flow on unignore (#125753)
* Reinitialize zeroconf discovery flow on unignore

* Adjust tests

* Improve comments

* Fix logic for updating discovery keys

* Add tests

* Use mock_config_flow helper in new config_entries test

* Add discovery_keys attribute to ConfigEntry

* Update zeroconf rediscovery

* Change type of ConfigEntry.discovery_keys

* Update tests

* Fix DiscoveryKey.from_json_dict and add tests

* Fix test

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-23 16:49:21 +02:00
Álvaro Fernández Rojas 95fa123a0b
Add Airzone main zone mode select (#124566)
* airzone: select: add zone master mode

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

* airzone: select: use MAIN instead of MASTER

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

* airzone: select: call async_add_entities once

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

* airzone: select: add options lambda function

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

* airzone: select: implement requested changes

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

* airzone: select: options_fn: return list

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-08-26 17:57:31 +02:00
Robert Resch ad50136dbd
Add created_at/modified_at to config entries (#122456) 2024-07-29 22:08:46 +02:00
Álvaro Fernández Rojas 2730713b39
Update aioairzone to v0.8.1 (#122481)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-07-23 14:22:42 -05:00
Álvaro Fernández Rojas e9d4c03300
Update aioairzone to v0.8.0 (#121991)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-07-15 20:49:21 +02:00
Álvaro Fernández Rojas c044417837
Dynamically add Airzone entities (#121891)
* airzone: reload entry on new devices

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

* Revert "airzone: reload entry on new devices"

This reverts commit 3ecc0844e4.

* airzone: sensor: dynamically add new entities

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

* tests: restore reverted airzone tests

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

* airzone: sensor: code fixes

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

* airzone: water_heater: dynamically add entities

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

* airzone: binary_sensor: dynamically add entities

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

* airzone: select: dynamically add entities

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

* airzone: climate: dynamically add entities

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

* tests: airzone: use freezer

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

* airzone: call async_add_entities once

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

* airzone: wrap async_add_listener on async_on_unload

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

* airzone: reduce number of entity listeners

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-07-13 21:45:08 +02:00
Joost Lekkerkerker 4766f48f47
Migrate Airzone to runtime_data (#119494) 2024-06-12 17:44:03 +02:00
epenet 3d31af3eb4
Move entity_registry_enabled_by_default to decorator [a-p] (#118794) 2024-06-04 16:18:42 +02:00
Joost Lekkerkerker b9281327c4
Use FlowResultType enum in config flow tests A-M (#114681) 2024-04-03 09:21:17 +02:00
Joost Lekkerkerker 9b41e3d124
Use is in enum comparison in config flow tests A-E (#114669) 2024-04-02 11:22:05 -10:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
J. Nick Koston 0bbe46d236
Fix formatting of mac addresses from dhcp discovery mocking in airzone (#110559)
dhcp returns addresses in lowercase without :
2024-02-14 20:59:16 +01:00
Jan Bouwhuis c7eab49c70
Raise ServiceValidationError on invalid select option (#106350)
* Raise ServiceValidationError on invalid select option

* Fix tests

* Correct place holders

* More test fixes
2023-12-27 09:45:55 +01:00
Álvaro Fernández Rojas 3be12c0611
Fix Airzone temperature range on new climate card (#105830)
* airzone: climate: fix double setpoint

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

* tests: airzone: fix double setpoint temperature

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

* tests: airzone: fix swapped double setpoint

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-12-16 18:42:58 +01:00
Álvaro Fernández Rojas a12c490cff
Update aioairzone to v0.7.2 (#105811) 2023-12-15 14:59:43 -10:00
Erik Montnemery 6908497c3d
Add minor version to config entries (#105479) 2023-12-12 08:44:35 +01:00
Franck Nijhof 04e0e2bd75
Update a* tests to use device & entity registry fixtures (#103711) 2023-11-09 20:46:20 +01:00
Álvaro Fernández Rojas 77baea8cb7
Allow setting HVAC mode through set_temperature service in Airzone integration (#103185)
* airzone: climate: set_temperature: support ATTR_HVAC_MODE

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

* tests: airzone: set_temp: check HVAC mode

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-11-06 01:32:03 +01:00
Joost Lekkerkerker 2601c6789d
Add entity translations to Airzone (#99054) 2023-10-28 13:56:45 +02:00
Álvaro Fernández Rojas f78199df9f
Fix Airzone climate double setpoint (#101744)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-10-10 10:18:52 +02:00
Álvaro Fernández Rojas 3238386f48
Add water heater support to Airzone (#98401)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-10 12:31:11 -05:00
Joost Lekkerkerker a5dcc25aab
Add snapshot assertion to Airzone (#98760)
Co-authored-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-08-30 17:11:55 +02:00
Álvaro Fernández Rojas 99b5c4932f
Add hot water sensor support to Airzone (#98500)
* airzone: sensors: add hot water support

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

* airzone: sensor: dhw: enable _attr_has_entity_name

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

* Add requested changes

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-08-22 22:48:05 +02:00
Álvaro Fernández Rojas c3c00e6984
Update aioairzone to v0.6.6 (#98399) 2023-08-14 11:21:12 -05:00
Álvaro Fernández Rojas 4981eadd31
Update aioairzone to v0.6.5 (#98163)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-08-10 16:47:16 +02:00
Meow a4b2ded503
Refactor deprecated RESULT_TYPE_* (#97367) 2023-07-30 19:27:30 +02:00
Álvaro Fernández Rojas 78380c0cd4
Allow turning Airzone slave zones on with any HVAC mode (#94721)
airzone: climate: allow turning slave zone on with any hvac mode

If the user selects a different mode on a slave zone from the one selected on
the master zone, it will raise an exception and it won't change the operation
mode or turn it on.
Change this behaviour so that the exception will still be raised but the slave
zone will be turned on and the hvac mode won't be changed.
This allows commanding airzone slave zones from limited APIs like homekit.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-27 21:25:41 +02:00
Álvaro Fernández Rojas 6019ec305a
Update aioairzone to v0.6.3 and fix issue with latest firmware update (#94100) 2023-06-06 08:23:48 +02:00
Álvaro Fernández Rojas 94ad9643b5
Update aioairzone to v0.6.1 (#93629) 2023-05-27 18:25:49 -05:00
Álvaro Fernández Rojas f5a235beee
Fix Airzone min/max climate temperatures (#93161)
* airzone: climate: fix max/min temps

The library now provides AZD_ABS_TEMP_MAX/AZD_ABS_TEMP_MIN which are useful for
devices with different max/min temperatures depending on the current working
mode (HEAT vs COOL).
These new values will have the highest/lowest max/min of both modes.
Until now, the max/min of the current working mode (HEAT/COOL) would be set
when starting Home Assistant, limiting the temperature range if the device
mode was changed after that.

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

* airzone: climate: update max/min temps

Some devices have different max/min climate temps depending on the active
mode (HEAT vs COOL), so we should update these values.

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

* Revert "airzone: climate: update max/min temps"

This reverts commit 988194d486.

* Revert "Revert "airzone: climate: update max/min temps""

This reverts commit e4ead24f71.

* tests: airzone: add max/min climate changes test

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

* tests: airzone: fix dict copy

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-24 21:18:59 +02:00
Álvaro Fernández Rojas a29adc0a6a
Airzone select improvements (#92894)
* airzone: select: remove unneed .keys()

Fixes late comment when select platform was introduced.

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

* airzone: select: make options translatable

This was a late comment when the select platform was introduced.

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

* airzone: select: change options to lists (from enums)

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

* tests: airzone: fix python 3.10 tests

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

* airzone: select: add manual dict values

This was requested in order to keep control of the translation strings.

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

* Revert "airzone: select: add manual dict values"

This reverts commit b818a2674d.

* Revert "tests: airzone: fix python 3.10 tests"

This reverts commit 93f8bd1430.

* Revert "airzone: select: change options to lists (from enums)"

This reverts commit e503a1dd3a.

* airzone: select: options: copy dict to list

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

* airzone: select: use degree symbol

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-24 08:21:24 +02:00
Álvaro Fernández Rojas 7e1a946705
Support Airzone temperature ranges (HEAT_COOL) (#93110)
* airzone: climate: add Temperature range support

This is useful for HEAT_COOL climate mode (Airzone AUTO).

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

* trigger CI

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-23 11:23:32 +02:00
Álvaro Fernández Rojas e5c12122e2
Update aioairzone to v0.5.6 (#93146) 2023-05-16 12:51:22 +02:00
Álvaro Fernández Rojas 45e7283584
Add Airzone fan speed support (#92840) 2023-05-12 22:56:17 +09:00
Álvaro Fernández Rojas e9705364a8
Fix Airzone Auto operation mode (#92796) 2023-05-12 16:07:29 +09:00
epenet 7b3a932cd9
Remove incorrect constant usage in test (#91198) 2023-04-11 10:00:17 +02:00
epenet 69a46d4002
Adjust pylint plugin for components fixtures (#90217)
* Adjust pylint plugin for components fixtures

* Adjust components

* Use MagicMock

* Adjust

* Use None
2023-03-26 15:21:19 +02:00
epenet 07a1a0efa9
Add type hints to integration tests (part 1) (#87777) 2023-02-09 16:09:13 +01:00
epenet 7db166b515
Fix tests typing helper (#86956) 2023-01-31 08:48:35 +01:00
Erik Montnemery 086a6460ef
Allow customizing sensor state precision (#86074)
* Allow customizing sensor precision

* Don't convert integer strings to floats

* Tweak converting sensor state to number

* Drop default rounding to 2 decimals

* Adjust test

* Tweak rounding, improve test coverage

* Don't convert to a number if not necessary

* Raise if native_precision is set and state is not numeric

* Address review comments

* Address comments, simplify

* Don't call  property twice

* Make exception more helpful
2023-01-25 08:55:46 +01:00
Álvaro Fernández Rojas 146b43f8c5
Add Airzone Select platform support (#76415)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-05 11:03:36 -10:00
Álvaro Fernández Rojas 5d4591a3ec
airzone: update aioairzone to v0.5.2 (#84690) 2022-12-28 16:37:50 +01:00
Álvaro Fernández Rojas f1ffb25d99
Add Airzone DHCP discovery support (#82339) 2022-11-23 12:32:23 -07:00