Commit Graph

11 Commits (2f7a7b0309679b1d57fd91a460205ca10d5c2318)

Author SHA1 Message Date
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