Commit Graph

179 Commits (f3074dc218dc46b25da2206dfa2bb590b5ac8c58)

Author SHA1 Message Date
Matthias Alphart af0f416497
Fix KNX default state updater option (#135611) 2025-01-19 12:53:09 +01:00
Joost Lekkerkerker 8db63adc11
Bump ruff to 0.9.1 (#135197) 2025-01-14 11:46:12 +01:00
Matthias Alphart dc1928f3eb
Delete KNX config storage when removing the integration (#135071) 2025-01-08 09:35:44 +01:00
Matthias Alphart b5a7a41ebe
KNX: Option to select specific tunnel endpoint on TCP connections (#131996) 2024-12-21 15:10:14 +01:00
Matthias Alphart 2f1c1d66cb
Support KNX lights with multiple color modes (#130842) 2024-11-18 10:22:10 +01:00
Matthias Alphart 57212bbf57
KNX: Cache last telegram for each group address (#130566) 2024-11-15 20:06:57 +01:00
Alexander Knöbel f01231277b
Add humidity to KNX climate (#128844) 2024-10-20 22:17:00 +02:00
G Johansson 2b2820018c
Remove legacy knx notify service (#128185) 2024-10-11 20:19:15 +02:00
G Johansson 666e8e133e
Cover state is enum (#127144)
* Change light state to use enum

* Adjust cover tests

* Update cover

* Fix covers

* Some tests

* More tests

* Fix tests

* Fix
2024-10-08 18:39:04 +02:00
Marc Mueller c1b24e6ba2
Small typing improvements (#126818)
* Add from __future__ import annotations

* Use PEP 695 type aliases

* Fix generator typing
2024-09-26 13:51:27 +02:00
Doron Somech d2d3ab2d98
Add fan support for KNX climate entities (#126368)
* Add fan mode support to knx climate

* fix linting errors

* remove unneeded None protection from CONF_FAN_PERCENTAGES_MODES

* Update homeassistant/components/knx/climate.py

Co-authored-by: Matthias Alphart <farmio@alphart.net>

* Update homeassistant/components/knx/climate.py

Co-authored-by: Matthias Alphart <farmio@alphart.net>

* Update homeassistant/components/knx/climate.py

Co-authored-by: Matthias Alphart <farmio@alphart.net>

* Update homeassistant/components/knx/schema.py

Co-authored-by: Matthias Alphart <farmio@alphart.net>

* find closest percentage when not in fan modes

* new field for fan speed mode, max steps apply to both step and percentage

* not picking FAN_OFF when the percentage is closest to zero

* add fan zero mode to support auto mode

* use StrEnum for FanZeroMode

* change default to 'percent'

* fix mypy errors

---------

Co-authored-by: Matthias Alphart <farmio@alphart.net>
2024-09-24 21:38:09 +02:00
Matthias Alphart 87240bb96f
Fix loading KNX UI entities with entity category set (#126290)
* Fix loading KNX UI entities with entity category set

* add test

* docstring fixes

* telegram order

* Optionally ignore telegram sending order in tests

because we can't know which platform initialises first
2024-09-20 11:16:58 +02:00
epenet 6d212ea24e
Add helper functions for repair tests (#125886)
* Expose repairs constants and function for other components

* Reorder

* Use helper methods

* Adjust core_files

* Improve

* Update test_migrate.py
2024-09-14 03:31:44 +02:00
epenet 6ea59ffa94
Add alias to DOMAIN import in tests [h-m] (#125577)
* Add alias to DOMAIN import in tests [h-m]

* Revert changes to mqtt
2024-09-09 15:21:01 +02:00
Matthias Alphart 713689491b
Remove KNX yaml config from `hass.data` (#124050)
* Remove KNX yaml config from `hass.data`

* Use HassKey
2024-09-09 09:01:21 +02:00
Matthias Alphart 1650cee16c
Check KNX integration is loaded on websocket calls (#123178) 2024-08-28 18:10:38 +02:00
Matthias Alphart 633ff0ea42
Handle KNX expose conversion exceptions and unavailable states (#124776) 2024-08-28 13:14:34 +02:00
Matthias Alphart 41e66edd14
Set default name for KNX outgoing telegram source (#124439) 2024-08-28 12:31:30 +02:00
Matthias Alphart d6d016e029
Fix KNX UI Light color temperature DPT (#123778) 2024-08-15 10:52:55 +02:00
Matthias Alphart b042ebe4ff
Rename KNX Climate preset modes according to specification (#123964)
* Rename KNX Climate preset modes according to specification

* change icon for "standby"
2024-08-15 08:37:10 +02:00
epenet 3e967700fd
Add missing return type in test __init__ method (part 2) (#123939)
* Add missing return type in test __init__ method (part 2)

* Adjust

* One more

* One more

* More
2024-08-14 17:59:15 +02:00
epenet 2c4b7c2577
Improve type hints in knx tests (#123787) 2024-08-13 13:32:44 +02:00
Matthias Alphart b3d1d79a49
Update xknx to 3.1.0 and fix climate read only mode (#123776) 2024-08-13 13:28:37 +02:00
Matthias Alphart 8ec8aef02e
Use freezer in KNX tests (#123044)
use freezer in tests
2024-08-02 08:48:41 +02:00
epenet faedba0407
Rename variable in knx tests (#122994)
* Rename variable in knx tests

* Type hints

* Type hints
2024-08-01 13:44:30 +02:00
Matthias Alphart 67ed8b207a
KNX: use xknx 3.0.0 eager telegram decoding (#122896)
* Use KNX xknx 3.0.0 eager telegram decoding

* review suggestion
2024-07-31 11:08:05 +02:00
Matthias Alphart 9351f300b0
Update xknx to 3.0.0 - more DPT definitions (#122891)
* Support DPTComplex objects and validate sensor types

* Gracefully start and stop xknx device objects

* Use non-awaitable XknxDevice callbacks

* Use non-awaitable xknx.TelegramQueue callbacks

* Use non-awaitable xknx.ConnectionManager callbacks

* Remove unnecessary `hass.async_block_till_done()` calls

* Wait for StateUpdater logic to proceed when receiving responses

* Update import module paths for specific DPTs

* Support Enum data types

* New HVAC mode names

* HVAC Enums instead of Enum member value strings

* New date and time devices

* Update xknx to 3.0.0

* Fix expose tests and DPTEnumData check

* ruff and mypy fixes
2024-07-31 09:10:36 +02:00
Matthias Alphart 34e72ea16a
Add support for KNX UI to create light entities (#122342)
* Add light to KNX UI-createable entity platforms

* review from switch

* Add a test
2024-07-22 09:35:29 +02:00
Matthias Alphart d418a40856
Create, update and delete KNX entities from UI / WS-commands (#104079)
* knx entity CRUD - initial commit - switch

* platform dependent schema

* coerce empty GA-lists to None

* read entity configuration from WS

* use entity_id instead of unique_id for lookup

* Add device support

* Rename KNXEntityStore to KNXConfigStore

* fix test after rename

* Send schema options for creating / editing entities

* Return entity_id after entity creation

* remove device_class config in favour of more-info-dialog settings

* refactor group address schema for custom selector

* Rename GA keys and remove invalid keys from schema

* fix rebase

* Fix deleting devices and their entities

* Validate entity schema in extra step - return validation infos

* Use exception to signal validation error; return validated data

* Forward validation result when editing entities

* Get proper validation error message for optional GAs

* Add entity validation only WS command

* use ulid instead of uuid

* Fix error handling for edit unknown entity

* Remove unused optional group address sets from validated schema

* Add optional dpt field for ga_schema

* Move knx config things to sub-key

* Add light platform

* async_forward_entry_setups only once

* Test crate and remove devices

* Test removing entities of a removed device

* Test entity creation and storage

* Test deleting entities

* Test unsuccessful entity creation

* Test updating entity data

* Test get entity config

* Test validate entity

* Update entity data by entity_id instead of unique_id

* Remove unnecessary uid unique check

* remove schema_options

* test fixture for entity creation

* clean up group address schema

class can be used to add custom serializer later

* Revert: Add light platfrom

* remove unused optional_ga_schema

* Test GASelector

* lint tests

* Review

* group entities before adding

* fix / ignore mypy

* always has_entity_name

* Entity name: check for empty string when no device

* use constants instead of strings in schema

* Fix mypy errors for voluptuous schemas

---------

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-07-21 20:01:48 +02:00
epenet bc3562a9e8
Use service_calls fixture in knx tests (#120930) 2024-07-01 14:33:01 +02:00
Matthias Alphart c8e9a3a8f4
Device automation extra fields translation for KNX (#119518) 2024-06-15 11:31:10 +02:00
epenet 38a6e666a7
Add missing return type to some test functions (#119665) 2024-06-14 08:26:45 +02:00
epenet 4962895f19
Fix consider-using-enumerate warnings in tests (#119506) 2024-06-12 16:27:56 +02:00
epenet fb1b0058ee
Fix consider-using-tuple pylint warnings in component tests (#119464)
* Fix consider-using-tuple pylint warnings in component tests

* Apply su

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2024-06-12 15:50:27 +02:00
Sid 721b2c2ca8
Enable Ruff PT012 (#113957) 2024-06-08 17:59:08 +02:00
Matthias Alphart a7429e5f50
Fix KNX `climate.set_hvac_mode` not turning `on` (#119012) 2024-06-06 22:40:04 +02:00
epenet c7cc465e5c
Add return type hints in tests (k-z) (#118942) 2024-06-06 10:11:29 +02:00
Jan Bouwhuis 066cd6dbef
Improve repair issue when notify service is still being used (#118855)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-06-05 15:41:22 +02:00
epenet 089874f818
Move mock_hass_config fixture to decorator (#118807) 2024-06-04 16:05:56 +02:00
epenet 3ac0fa53c8
Cleanup unused FixtureRequest in tests (#118780) 2024-06-04 11:49:21 +02:00
Matthias Alphart 1352c4e427
Increase test coverage for KNX Climate (#117903)
* Increase test coverage fro KNX Climate

* fix test type annotation
2024-05-30 21:42:11 +02:00
epenet 242ee04642
Improve type hints in tests (i-p) (#118380) 2024-05-30 08:47:08 +02:00
Matthias Alphart 70cf176d93
Add value_template option to KNX expose (#117732)
* Add value_template option to KNX expose

* template exception handling
2024-05-22 00:09:42 +02:00
Matthias Alphart 622d1e4c50
Add data point type option to `knx.telegram` trigger (#117463)
* Add data point type (dpt) option to `knx.telegram` trigger

* Rename from `dpt` to `type` to match services

* Add test for GroupValueRead telegrams

* Fix device trigger schema inheritance

* Typesafe dispatcher signal

* readability

* Avoid re-decoding with same transcoder
2024-05-22 00:03:54 +02:00
Matthias Alphart b94735a445
Add `async_turn_on/off` methods for KNX climate entities (#117882)
Add async_turn_on/off methods for KNX climate entities
2024-05-21 23:54:43 +02:00
J. Nick Koston 5a609c34bb
Fix blocking I/O in the event loop when loading timezones (#117721) 2024-05-20 11:06:03 +02:00
Matthias Alphart bca277a027
Add `knx.telegram` integration specific trigger; update KNX Interface device trigger (#107592)
* Add `knx.telegram` integration specific trigger

* Move implementation to trigger.py, use it from device_trigger

* test device_trigger

* test trigger.py

* Add "incoming" and "outgoing" and handle legacy device triggers

* work with mixed group address styles

* improve coverage

* Add no-op option

* apply changed linting rules

* Don't distinguish legacy device triggers from new ones

that's now supported since frontend has fixed default values of extra_fields

* review suggestion: reuse trigger schema for device trigger extra fields

* cleanup for readability

* Remove no-op option
2024-05-14 14:45:49 +02:00
J. Nick Koston 481de8cdc9
Ensure config entry operations are always holding the lock (#117214)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-12 08:20:08 +09:00
Jan Bouwhuis 7eb8f265fe
Add shared notify service migration repair helper (#117213)
* Add shared notifiy service migration repair helper

* Delete ecobee repairs.py

* Update dependency

* Fix file test

* Fix homematic tests

* Improve tests for file  and homematic
2024-05-11 21:13:44 +02:00
Matthias Alphart f115525137
Migrate KNX notify service to entity platform (#115665) 2024-04-24 07:51:02 +02:00