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
Joost Lekkerkerker
a82410d5e9
Deduplicate constants E-Z ( #105657 )
2023-12-13 17:05:37 +01:00
Aarni Koskela
706add4a57
Switch formatting from black to ruff-format ( #102893 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
Erik Montnemery
67e25dc0bf
Quote domain name in setup logs ( #104239 )
...
* Quote domain name in setup logs
* Update tests
2023-11-20 12:55:16 +01:00
Erik Montnemery
80813e992d
Improve formatting of component errors ( #104081 )
...
* Improve formatting of component errors
* Update tests
2023-11-17 23:01:00 +01:00
Jan-Philipp Benecke
0eafc8f2cd
Update k-l* tests to use entity & device registry fixtures ( #103929 )
2023-11-13 20:02:33 +01: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
Erik Montnemery
e6895b5738
Fix menu in knx config flow ( #102168 )
...
* Fix menu in knx config flow
* Update tests
* Fix strings.json
* Rename new menu steps for readabiltiy
---------
Co-authored-by: Matthias Alphart <farmio@alphart.net>
2023-10-17 22:25:35 +02:00
Michael Hammer
f899e5159b
KNX: Provide project data and parser version via websocket ( #100676 )
...
* feat(knxproject-explore): providing knxproject via websocket, also xknxproject version in info mesage
* feat(knxproject-explore): adding test case
* reverted back adding of xknxproject version
* fix(): Enriching get project test case to check against FIXTURE
* feat(knxproject-explore): providing knxproject via websocket, also xknxproject version in info mesage
* feat(knxproject-explore): adding test case
* reverted back adding of xknxproject version
* fix(): Enriching get project test case to check against FIXTURE
2023-09-26 23:17:37 +02:00
Joost Lekkerkerker
9c54c4abf5
Use snapshot assertion for KNX diagnostics ( #98724 )
...
Co-authored-by: farmio <farmio@alphart.net>
2023-08-21 11:48:55 +02:00
Matthias Alphart
0f5d423d1e
Move KNX keyring validation and storage to helper module ( #97931 )
...
* Move KNX keyfile validation and store to helper module
* Rename module and fix tests
2023-08-07 23:30:14 +02:00
Paul Bottein
83af2f5b8b
Allow to sort options in select selector ( #97680 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-08-03 21:49:22 +02:00
Matthias Alphart
74deb8b011
Add datetime platform to KNX ( #97190 )
2023-07-25 11:04:05 +02:00
Matthias Alphart
8ff9f2ddbe
Add date platform to KNX ( #97154 )
2023-07-24 21:12:37 +02:00
Matthias Alphart
89259865fb
Restore KNX telegram history ( #95800 )
...
* Restore KNX telegram history
* increase default log size
* test removal of telegram history
2023-07-09 21:15:55 +02:00
Matthias Alphart
479015244d
KNX Cover: Use absolute tilt position if available ( #96192 )
2023-07-09 12:00:51 +02:00
Matthias Alphart
c81b6255c2
Use `async_on_remove` for KNX entities removal ( #95658 )
...
* Use `async_on_remove` for KNX entities removal
* review
2023-07-01 07:16:45 -04:00
Matthias Alphart
1615f3e1fd
Add reload service to KNX ( #95489 )
2023-06-28 21:45:17 -04:00
Matthias Alphart
489781c1e6
Add time platform to KNX ( #95302 )
2023-06-28 15:19:32 +02:00
Franck Nijhof
3e85a29b86
Move overlapping pylint rules to ruff, disable mypy overlap ( #94359 )
2023-06-27 17:42:46 +02:00
Matthias Alphart
2ce23c17ca
Update KNX frontend - add Group monitor telegram detail view ( #95144 )
...
* Use TelegramDict for WS communication
* Update knx_frontend
2023-06-25 14:58:08 +02:00
Matthias Alphart
733bca88f1
Fix KNX device trigger passing info data ( #95076 )
2023-06-22 21:13:10 +02:00
Ville Skyttä
2e59ae9e90
Import `util.dt` as `dt_util` in `components/[k-o]*` ( #93760 )
2023-05-29 23:02:14 +02:00
Matthias Alphart
b10e73e2d4
Configurable KNX Telegram history size ( #93248 )
...
* Configurable KNX Telegram history size
* Add maximum value to description
2023-05-22 18:09:59 +02:00
Matthias Alphart
c522ea855d
KNX Group Monitor: Load latest 50 Telegrams on start ( #93153 )
...
* remove impossible test
IndividualAddress telegrams are not processed by xknx.telegram_queue
* Use Telegrams helper class for group monitor messages
* Store 50 telegrams in deque for group monitor
* Send recent telegrams at once on connection of group monitor
* Update KNX-frontend to support group monitor prepopulation
2023-05-17 09:58:00 +02:00
Matthias Alphart
2f8e8901fc
Add KNX interface device trigger for telegrams ( #93102 )
...
* telegram device trigger initial
* add Telegrams helper class
to parse and convert Telegram only once instead of once per device trigger
* translation
* label for extra_field
* test device trigger
* test trigger callback removal
* rename extra_field key to same name as used in trigger
* typo
2023-05-15 22:59:29 +02:00
Matthias Alphart
6250b0a230
Add a custom panel for KNX with a group monitor ( #92355 )
...
* Add KNX panel
* provide project data for the panel group monitor
* upload and delete project from panel
* test project store
* more tests
* finish tests
* use integers for DPTBinary payload monitor display
* add project to diagnostics
* require new frontend version
* update knx_frontend
* review suggestions
* update xknxproject to 3.1.0
---------
Co-authored-by: Marvin Wichmann <me@marvin-wichmann.de>
2023-05-11 00:13:22 +02:00
Matthias Alphart
33808cd268
Add entity name translations to KNX system sensors ( #91396 )
...
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-04-23 01:31:59 +02:00
Matthias Alphart
95d44e100b
Update xknx to 2.9.0 ( #91282 )
...
* Update xknx to 2.8.0
* add tests for validators
* Update strings.json
* Update xknx to 2.9.0
2023-04-22 18:25:14 +02:00
Matthias Alphart
557b9c7d51
Add KNX interface device with diagnostic entities ( #89213 )
2023-03-19 02:13:52 -11:00
Matthias Alphart
bfae8992a9
Better log message for KNX expose conversion error ( #89400 )
2023-03-08 22:42:07 +01:00
epenet
14bf68ad03
Cleanup expected_lingering_tasks in knx ( #89279 )
2023-03-07 11:59:31 +01:00
epenet
c51bde9a26
Fail CI on lingering tasks ( #88905 )
2023-03-07 11:35:48 +01:00
Matthias Alphart
36dabaaea6
Fix lingering tasks in KNX tests ( #89201 )
2023-03-05 20:19:42 -05:00
Matthias Alphart
e849878a48
Fix KNX Keyfile upload ( #89029 )
...
* Fix KNX Keyfile upload
* use shutil.move instead
2023-03-02 10:13:02 -05:00
epenet
d65dff3f9e
Adjust entity registry access in tests (2) ( #88960 )
2023-03-01 16:23:36 +01:00
Jan Bouwhuis
4f6a25b470
Allow parameterizing YAML config in tests ( #87981 )
...
* Add fixture to parameterize yaml config
* Apply to more tests
* Re-add @fixture label
* Add fixtures to patch yaml content and targets
* Typo
* Improve docstr
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Update references to mock_yaml_configuration
* Apply new fixtures
* Apply to check_config tests
* Follow up comments
* Rename fixtures, update docstr
* Split paths
* Patch load_yaml_config_file instead
* sort
* Fix tests
* improve docst
* Rename fixtures
* sorting
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Improve docstr
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Improve docstr
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Improve docstr
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Improve docstr
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Improve docstr
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Improve docstr
Co-authored-by: Erik Montnemery <erik@montnemery.com>
---------
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-20 16:57:12 +01:00
Matthias Alphart
6a0ea09f29
Upload KNX Keyfile from Config/Options Flow directly ( #88097 )
...
* Manage KNX Keyfile from UI
* migrate config entry to use new keyfile
* Revert "migrate config entry to use new keyfile"
use same config style as before instead of entry version migration
* clean up uploaded file when integration is removed
* change default filename
* revert to previous step name
* remove empty directory on unload
2023-02-20 14:48:56 +01:00
Franck Nijhof
ed79265843
Enable Ruff PT006 ( #88165 )
...
* Enable Ruff PT006
* Adjust existing cases
* Fix tests
* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
Matthias Alphart
d7861e79c5
Update xknx to 2.5.0 ( #88069 )
2023-02-14 12:44:43 +01:00
epenet
ea29cdfe83
Add type hints to integration tests (part 12) ( #87997 )
2023-02-13 13:03:51 +01:00
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const ( #87792 )
...
* Move EntityCategory to homeassistant.const
* Fix more imports
2023-02-09 20:15:37 +01:00
epenet
f75ac17554
Add type hints to integration tests (j-m) ( #87704 )
2023-02-08 19:06:59 +01:00
epenet
a79be493e5
Adjust hass_client type hint in integration tests ( #86954 )
...
* Adjust hass_client type hint in integration tests
* Adjust hass_client_no_auth
* Fix rebase
2023-02-02 16:29:57 -05:00
Matthias Alphart
db428f2141
Update xknx to 2.3.0 - add some DPTs, Routing security ( #85658 )
...
Update xknx to 2.3.0
2023-01-11 00:24:56 +01:00
Matthias Alphart
0c7eb431e6
KNX ConfigFlow: add selection of secure tunnel endpoint ( #84651 )
2022-12-28 11:43:03 +01:00
Matthias Alphart
a752232de8
KNX ConfigFlow: Validate contents of knxkeys file ( #84411 )
2022-12-27 21:00:19 +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
Matthias Alphart
4ca6db825c
Address late KNX flow tests review ( #83208 )
...
* Address late KNX flow tests review
* Update tests/components/knx/test_config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-12-04 18:39:27 +01:00
Matthias Alphart
6cef37641c
KNX Config/OptionsFlow: Test connection to manually configured tunnel ( #82872 )
2022-12-03 12:53:12 +01:00
Matthias Alphart
a43d944309
Address late KNX flow tests review ( #82975 )
...
* KNX flow tests review
* patch out async_setup_entry in options-flow tests
* remove unneeded hass.async_block_till_done()
* Update test_config_flow.py
* autouse setup mock
* patch out async_setup too
* rename fixture according to pytest docs
* test call count to async_setup_entry
* dict access instead of .get()
2022-11-30 18:54:06 +01:00
Matthias Alphart
0561c14d53
Add `text` platform for KNX ( #82811 )
2022-11-29 18:05:51 +01:00
Matthias Alphart
e738df502b
Fix KNX secure config switching from manual to keyfile ( #82724 )
2022-11-28 10:18:45 +01:00
Matthias Alphart
cb06f8b668
KNX Config/OptionsFlow: minimize wait time for interface discovery ( #81982 )
...
* Minimize wait time for interface discovery
* fix OptionsFlow when connection failed
there is no `self.hass.data["KNX"]` when we are in retry mode after failed integration setup
* review changes
* fix new tests
2022-11-28 07:03:51 +01:00
Matthias Alphart
4517af509c
Add support for KNX IP-Secure routing ( #82765 )
...
* always use instance variable for new entry data
- change `self._tunneling_config` to non-optional `self.new_entry_data`
- always use self.new_entry_data in `finish_flow()`
* support secure routing
* amend current tests
* use sync latency tolerance
* test secure routing config flow
* diagnostics redact backbone_key
* test xknx library setup
* check length of backbone_key
* better readable key validation
2022-11-27 23:33:12 +01:00
Matthias Alphart
daf56e92a0
Update xknx to 2.0.0 ( #82709 )
2022-11-26 06:49:11 +01:00
Matthias Alphart
ee9231363f
Refactor KNX Config and Options flows ( #80641 )
2022-11-10 14:25:41 +01:00
Matthias Alphart
428a33c00f
Migrate KNX to use kelvin for color temperature ( #81112 )
2022-10-27 16:00:34 -04:00
epenet
0d696b84b2
Cleanup root component imports in tests ( #78893 )
2022-09-21 06:57:41 -10:00
epenet
00dd27ef1b
Apply hass-relative-import to tests (i-r) ( #78732 )
2022-09-19 09:46:59 +02:00
Matthias Alphart
441d7c0461
Wait for config entry platforms in KNX ( #77437 )
2022-08-28 12:36:31 +02:00
Erik Montnemery
3d723bddf8
Use mock_restore_cache in tests ( #77298 )
2022-08-25 09:28:53 +02:00
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