Commit graph

26 commits

Author SHA1 Message Date
Matthias Alphart
633ff0ea42
Handle KNX expose conversion exceptions and unavailable states (#124776) 2024-08-28 13:14:34 +02:00
Erik Montnemery
629b919707
Remove unnecessary assignment of Template.hass from knx (#123977) 2024-08-15 10:56:04 +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
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
Marc Mueller
0f03079065
Update import for EventStateChangedData [i-z] (#114900) 2024-04-04 11:48:29 -10:00
Marc Mueller
8f1e2f1a7b
Replace EventType with Event [h-i] (#112740) 2024-03-08 19:35:47 +01:00
Marc Mueller
59a6035d3f
Add empty line after module docstring [j-m] (#112700) 2024-03-08 09:01:29 -05:00
Matthias Alphart
70196d5ee0
Fix KNX expose default value when attribute is None (#103446)
Fix KNX expose default value when attribute is `null`
2023-11-06 08:39:40 +01:00
Marc Mueller
5b73bd2f8e
Use EventType for state changed [h-m] (#97117) 2023-07-24 08:01:50 +02:00
Matthias Alphart
bfae8992a9
Better log message for KNX expose conversion error (#89400) 2023-03-08 22:42:07 +01:00
Matthias Alphart
acd31d4ae3
Add cooldown and respond_to_read options for KNX expose (#84613)
Add cooldown option for KNX expose
2022-12-27 20:36:02 +01:00
Marvin Wichmann
98aa69fdaf
Fix KNX Expose for strings longer than 14 bytes (#63026)
* Fix KNX Expose for too long strings

* Fix tests

* Catch exception and avoid error during config entry setup for exposures

* Properly catch exceptions in knx expose

* Fix pylint

* Fix CI

* Add test for conversion error
2022-01-29 14:32:12 +01:00
Marvin Wichmann
62584b4813
Add tests for KNX diagnostic and expose (#64938)
* Add test for KNX diagnostic

* Add test for KNX expose

* Apply review suggestions
2022-01-27 23:03:20 +01:00
Marc Mueller
e0c0d00833
Use assignment expressions 39 (#58829) 2021-10-31 18:56:25 +01:00
Marc Mueller
364767ff22
Import Callable from collections.abc (4) (#56778) 2021-09-29 16:15:36 +02:00
Matthias Alphart
e8d7952880
Refactor KNX tests (#53183)
* refactor tests for KNX

- implement KNXTestKit class for convenient setup and assertion of KNX telegrams
- add fixture returning an instance of KNXTestKit with automatic cleanup test

* add tests for expose default attribute

- fix expose edge case not covered by #53046

* use asyncio.Queue instead of AsyncMock.call_args_list

for better readability

* get xknx from Mock instead of hass.data

* fix type annotations

* add injection methods for incoming telegrams

* rest read-response in expose
2021-07-19 23:39:19 -05:00
da-anda
6fe38eadf2
Fix knx expose feature not correctly falling back to default value (#53046) 2021-07-15 14:41:04 +02:00
Matthias Alphart
6e20edc30c
Update xknx to version 0.18.5 (#51644)
* xknx 0.18.5

* fix integer DPTs trying to cast str state with `int()`

* Delint

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-09 14:08:29 +02:00
Matthias Alphart
4f9b7254d2
Initialize KNX expose value (#49623)
* simplify value extraction

* allow 0/1 and "True" / "False" for binary exposes

* initialize ExposeSensor value

* handle binary states

* use default for initialization
2021-05-26 11:21:11 +02:00
Matthias Alphart
051f29f9b6
Remove KNX type alias for homeassistant.core types (#48422) 2021-03-27 22:20:11 +01:00
mptei
02b0a4ca1f
Xknx unneeded expose (#48311) 2021-03-26 14:51:36 +01:00
Matthias Alphart
987c2d1612
Type check KNX integration expose (#48055) 2021-03-19 10:12:55 +01:00
Marc Mueller
25a13d1554
Update typing 10 (#48071) 2021-03-18 13:07:04 +01:00
Matthias Alphart
3fda9fd0c6
KNX address constant (#47196) 2021-03-01 21:59:36 +01:00
Matthias Alphart
b583ded8b5
Fix KNX services.yaml (#46897) 2021-02-23 22:59:16 +01:00
Matthias Alphart
1a27af43cc
Add KNX service exposure_register (#45257) 2021-02-21 19:38:17 -10:00