Commit Graph

52 Commits

Author SHA1 Message Date
Matthias Alphart
a98f658854 Update xknx to 0.22.0 (#75749) 2022-07-26 10:32:26 +02:00
Franck Nijhof
a6244eea28 Search/replace RESULT_TYPE_* by FlowResultType enum (#74656) 2022-07-07 21:28:18 +02:00
G Johansson
90e1fb6ce2 Weather unit conversion (#73441)
Co-authored-by: Erik <erik@montnemery.com>
2022-06-23 10:48:30 +02:00
Erik Montnemery
8c0ae545c9 Migrate knx NumberEntity to native_value (#73536) 2022-06-15 14:39:56 +02:00
epenet
4eb46d45ca Cleanup deprecated async_get_registry in tests (#72059) 2022-05-18 13:12:38 +02:00
epenet
7d2363ad22 Use light enums in tests (#70801) 2022-04-26 16:32:00 +02:00
epenet
069dd567f7 Use climate enums in knx (#70676) 2022-04-25 14:57:31 +02:00
Matthias Alphart
639e3bb900 Add optional type for KNX notify entity configuration (#70451) 2022-04-23 12:21:58 +02:00
Marvin Wichmann
3d30a757bf Update xknx to 0.20.2 (#69853) 2022-04-11 16:51:13 +02:00
Matthias Alphart
b3d1574a71 Refactor KNX config flow and validate user input (#69698)
* validate config flow user input

* test flow for invalid user input

* validate multicast address blocks

* Update homeassistant/components/knx/config_flow.py

Co-authored-by: Marvin Wichmann <me@marvin-wichmann.de>

Co-authored-by: Marvin Wichmann <me@marvin-wichmann.de>
2022-04-10 15:56:45 +02:00
Marvin Wichmann
b5b514b62f Full test coverage for KNX integration (#69697)
* Full test coverage for KNX integration

* Allow for 0 values, since we all live at those kind of areas in the world

* Remove unneeded method

* Add missing test for climate mode

* Cleanup test and remove fixture that was used only once
2022-04-09 00:33:50 +02:00
Marvin Wichmann
9b05a1264a Add support for IP secure to KNX config flow (#68906)
* Add support for TCP Secure in KNX config flow

* Add support for TCP Secure in KNX config flow

* Fix typing

* Fix import

* Move assert up to cover all possible cases
2022-03-30 21:10:47 +02:00
Marvin Wichmann
cec3a08b95 Cleanup KNX integration (#68820)
* Cleanup KNX integration

* Cleanup KNX integration

* Update homeassistant/components/knx/__init__.py

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

Co-authored-by: Matthias Alphart <farmio@alphart.net>
2022-03-29 16:46:02 +02:00
Matthias Alphart
f2aee38841 Run KNX protocol logic in a separate thread (#68807) 2022-03-28 23:56:29 +02:00
Matthias Alphart
d4370395e2 Update xknx to 0.19.1 (#65275) 2022-01-30 20:12:44 -08: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
Marvin Wichmann
072f7d5611 Add support for TCP tunneling connections to KNX (#64928) 2022-01-26 06:36:07 +01:00
Matthias Alphart
29baad8848 Update xknx to 0.19.0 (#64379) 2022-01-18 21:38:13 +01:00
Marvin Wichmann
b9247f3952 Fix local_ip handling in KNX options flow (#62969) 2021-12-30 01:13:58 +01:00
Mirko Lenz
ab4effc7e2 Allow sending GroupValueResponse telegrams with knx.send service (#62639)
* Add knx.respond service

* Combine knx.send and knx.respond services

* Rename knx attribute and fix tests

* Use parametrization in tests

Co-authored-by: Marvin Wichmann <marvin.wichmann@unic.com>
2021-12-29 18:15:48 +01:00
Dave T
c7b910ca33 Use new enums in knx tests (#62513)
* Use new enums in knx tests

* Code review: Swap == for is
2021-12-22 09:31:23 +01:00
Matthias Alphart
6cf9f1a0cc Update xknx to 0.18.14 (#62411)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-12-20 19:22:04 +01:00
Marvin Wichmann
cefbc2c428 Allow setting local_ip for knx routing connections (#61836) 2021-12-15 13:15:56 +01:00
Marvin Wichmann
affa3a6ada Add missing local_ip to KNX config flow and options flow (#61018)
* Add missing local_ip to KNX config flow and options flow

* Update strings
2021-12-04 23:07:28 +01:00
Marvin Wichmann
3baa7b679d Use new Platform enum in KNX (#60902) 2021-12-03 09:29:38 -08:00
Marvin Wichmann
e5c33474e3 Add config and options flow to KNX integration (#59377) 2021-11-20 11:30:41 +01:00
Matthias Alphart
c0a8cea6fb Fix KNX individual light tests (#59749) 2021-11-16 00:02:39 +01:00
Matthias Alphart
ca3e672b1d Fix KNX rgb(w) color (#51060)
* calculate brightness from color; scale color

* fix merge

* fix sending color only for brightness independent rgb color

* fix tests for rgb and rgbw color

* use public match_max_scale
2021-11-15 20:42:59 +01:00
Matthias Alphart
4e1958c1bd Add Button platform to KNX integration (#59082)
* add button platform

* default values for payload and payload_length

* allow `type` configuration for encoded payloads

* add test for type configuration

* move common constants to const.py

- CONF_PAYLOAD
- CONF_PAYLOAD_LENGTH

* validate payload for payload_length or type

* c&p errors

* fix unique_id and pylint

* fix validator
2021-11-10 20:34:35 +01:00
Matthias Alphart
fc7d4ed118 Add decoded telegram payload to knx_event service (#57621)
* decode knx_event telegram payload with given dpt

* exception handling for invalid payloads

* Update homeassistant/components/knx/__init__.py

Co-authored-by: Marvin Wichmann <marvin@fam-wichmann.de>

Co-authored-by: Marvin Wichmann <marvin@fam-wichmann.de>
2021-11-06 19:31:25 +01:00
Marvin Wichmann
54e7ef08e3 Add test for KNX weather entity (#58898) 2021-11-04 22:52:39 +01:00
Marvin Wichmann
56b7f94bbc Add tests for KNX scene (#58900) 2021-11-04 22:51:42 +01:00
Matthias Alphart
4d4d778598 Add tests for KNX light (#58912)
* test lights: simple, brightness, color_temp

* hs, xyy, rgb individual

* test rgb, rgbw
2021-11-04 22:43:38 +01:00
Matthias Alphart
d0cc2a530a Remove redundant value test in KNX Number entity (#58455)
* remove redundant test for out of bound value

* increase test coverage for number
2021-10-26 10:42:42 +02:00
Marvin Wichmann
e9ca511327 Add support for entity category for necessary KNX platforms (#58357) 2021-10-24 20:12:26 -07:00
Marvin Wichmann
85ecb7ce3a feat: Add unit of measurement to KNX number platform (#58353) 2021-10-24 13:16:19 -07:00
Marvin Wichmann
5193e3115d Restore the previous state of a KNX binary sensor (#57891) 2021-10-22 20:52:41 +02:00
Marvin Wichmann
48d4cdf882 Update xknx to 0.18.11 and fix flaky test (#57877)
* Update xknx to 0.18.11

* review: join the queue before actually asserting
2021-10-17 09:43:18 +02:00
Marvin Wichmann
addb91d49e Update xknx to version 0.18.10 (#57635)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-10-14 10:54:48 -07:00
Matthias Alphart
19d81af4c1 Test KNX fan (#53621) 2021-08-24 12:00:37 +02:00
Matthias Alphart
ab34ef475e Test KNX binary sensor (#53820)
* test binary_sensor

* test binary_sensor with reset_after
2021-08-05 23:33:20 -05:00
Matthias Alphart
8ead20a76b Test knx sensor (#54090) 2021-08-05 23:26:02 -05:00
Matthias Alphart
4e4bb2e5a8 Test KNX events (#53433)
* test knx_event

* use async_capture_events
2021-07-28 19:04:11 +02:00
Matthias Alphart
993756e90a Test KNX select (#53371)
* test KNX select

* cover everything

* Update tests/components/knx/test_select.py
2021-07-24 15:25:58 +02:00
Matthias Alphart
745314b115 Test KNX services (#53367) 2021-07-24 14:03:04 +02:00
Matthias Alphart
9f14b2cef5 Test KNX switch (#53289) 2021-07-21 15:04:14 -07: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
mptei
1d28f485d3 Patch ip interface instead of XKNX in knx (#49064)
* knx: Deeper tests.

* Set rate_limit to 0; removed waiting for queue
2021-04-11 23:01:30 +02:00
mptei
dd538bd291 Fix knx tests (#48407) 2021-03-29 12:17:54 +02:00