Commit Graph

231 Commits (0d7b531285497b095fe08ba7631c3dbc41da0cee)

Author SHA1 Message Date
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
Matthias Alphart 45a98aee10
Configurable mode for KNX number entity (#58268) 2021-10-24 11:24:05 +02:00
Marvin Wichmann 5193e3115d
Restore the previous state of a KNX binary sensor (#57891) 2021-10-22 20:52:41 +02:00
Marc Mueller 184e0d7fdf
Use assignment expressions 26 (#58187) 2021-10-22 11:31:17 +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
Marc Mueller 364767ff22
Import Callable from collections.abc (4) (#56778) 2021-09-29 16:15:36 +02:00
Matthias Alphart cd0ae66d58
Add CONF_STATE_CLASS to `sensor/__init__.py` (#54106)
* add CONF_STATE_CLASS to const.py

* move to `sensor/__init__.py`

* move to sensor/const.py

* Revert "move to sensor/const.py"

This reverts commit 604d0d066b.

* move it to `sensor/const.py` but import it from `sensor/__init__.py`

* add Modbus
2021-08-27 05:54:50 +02:00
Matthias Alphart 17a7f7adeb
Configurable default `hvac_mode` for KNX climate (#54289) 2021-08-24 12:53:11 +02:00
Erik Montnemery 2720ba2753
Move temperature conversions to sensor base class (4/8) (#54472)
* Move temperature conversions to entity base class (4/8)

* Fix litterrobot sensor

* Fix tests
2021-08-11 21:17:47 +02:00
Matthias Alphart 98877924d3
Add `state_class` for KNX sensors (#53996) 2021-08-05 10:11:01 -07:00
Matthias Alphart 4d6c95a126
Don't double-validate KNX select options (#54020) 2021-08-05 08:16:33 +02:00
Matthias Alphart 27d42e0cd8
KNX: Support for HS-color lights (#53538) 2021-07-27 19:36:46 +02:00
Matthias Alphart c1c6c54b45
xknx 0.18.9 (#53519) 2021-07-26 23:18:20 +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
Ville Skyttä 470f2dd73f
Upgrade pyupgrade to 2.21.2, apply its changes (#52987) 2021-07-19 10:46:09 +02:00
da-anda 6fe38eadf2
Fix knx expose feature not correctly falling back to default value (#53046) 2021-07-15 14:41:04 +02:00
Daniel Hjelseth Høyer fbad453c89
Pylint 2.9.3 (#52972)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-07-14 21:44:57 -07:00
Tom Matheussen 293690e3d8
Fix KNX Fan features (#52732)
* Fan entity should return support features

* Revert "Fan entity should return support features"

This reverts commit 3ad0e87708.

* Restore supported_features for KNX fan
2021-07-08 15:05:43 +02:00
Matthias Alphart 9ed93de472
xknx 0.18.8 (#52340) 2021-06-30 15:06:33 +02:00
Matthias Alphart d4211c4a66
Cleanup KNX supported_features for climate, cover and fan (#52218) 2021-06-28 20:22:44 +02:00
Matthias Alphart 253310aaa4
Add respond_to_read option to KNX switch (#51790) 2021-06-27 18:34:41 +02:00
Matthias Alphart 89cdda9fe6
Add idle hvac_action to KNX climate (#52006)
* add idle hvac_action and command_value extra_state_attribute

* use class attribute for unit
2021-06-27 18:31:07 +02:00
Matthias Alphart 5687ced7b3
Cleanup KNX integration (#52168)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-06-26 14:30:36 +02:00
Matthias Alphart 74db49fae4
Add KNX select entity (#52026)
* select entity for knx

* validate select options

* lint

* phytonify

* Tweak

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-06-24 10:54:04 +02:00
Matthias Alphart 742159a6a6
Add number entity to KNX (#51786)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-06-23 17:20:49 +02:00
Matthias Alphart 1d941284ff
Fix not awaiting async super method in KNX climate (#52005) 2021-06-19 01:10:17 -05:00
Matthias Alphart c246e211eb
Update xknx to 0.18.7 (#52000) 2021-06-18 22:22:27 -05:00
Matthias Alphart b08f473da4
Add current hvac_action to KNX climate (#51464) 2021-06-15 17:51:16 +02:00
Matthias Alphart c0d311473c
Restore state of KNX Switch (#51761) 2021-06-15 13:08:19 +02:00
Matthias Alphart 4afe7de07f
xknx 0.18.6 (#51758) 2021-06-12 11:19:05 +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 e5c70c8789
Update xknx to version 0.18.4 (#51459) 2021-06-04 08:34:16 +02:00
Matthias Alphart 549b0b0727
KNX: Support for XY-color lights (#51306)
* support for xy-color

* replace invalid name
2021-06-01 08:59:51 +02:00
Matthias Alphart 164e45f0a7
KNX: move some Schema to schema.py (#51307)
* create platform schema node from schema class

* move connection schema to schema.py

* rename SCHEMA to ENTITY_SCHEMA

* Final module level constants
2021-06-01 08:59:23 +02:00
Matthias Alphart 5acc3a1083
xknx 0.18.3 (#51277) 2021-05-31 09:58:48 +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 8b21a652ba
Create KNX sensor entity directly from config (#49642)
* create sensor entities directly from config

* move staticmethod to module level

* remove factory call
2021-05-25 20:16:54 +02:00
tkdrob 028a07d86f
Wrap up selectors (#50794)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-25 14:45:17 +02:00
Matthias Alphart 331cb3b74d
Fix KNX light: turn on color light with only brightness (#50979)
* fix turn on color light with only brightness

* fix comment

* fix individual_color address assignment

* python 3.8 compatibility
2021-05-24 09:51:33 +02:00
Matthias Alphart 5ca5b9ac89
Improve KNX config validation (#50980)
* remove dict repacking

* check binary_sensor device_class

* check cover device_class

* check sensor_type
2021-05-23 10:42:17 +02:00
Matthias Alphart 3e1f51883e
Create KNX weather entity directly from config (#49640)
* create climate entities directly from config

* deprecate create_sensors

* move create staticmethod to module level

* add comment for deprecation date
2021-05-21 01:30:37 +02:00
Michael b1138b1aab
Add constructor return type in integrations E-K (#50902) 2021-05-20 18:47:30 +03:00
Matthias Alphart be6a1bf096
Create KNX climate entity directly from config (#49638)
* create climate entities directly from config

* deprecate create_temperature_sensors

* move create staticmethod to module level

* use get() fro optional CONF_SETPOINT_SHIFT_MODE

* Fix deprecated version comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-20 12:23:41 +02:00
Matthias Alphart ac6d99d434
Create KNX binary_sensor entities directly from config (#50708) 2021-05-17 15:33:09 +02:00
Matthias Alphart 1c7242a37a
Create KNX cover entities directly from config (#50707) 2021-05-17 12:17:19 +02:00
Matthias Alphart 7b18860dcd
Update xknx to version 0.18.2 (#50491)
* xknx 0.18.2

* individual colors without switch

* make `setpoint_shift_mode` optional

* Update homeassistant/components/knx/schema.py
2021-05-17 11:18:13 +02:00
Matthias Alphart 05c6f3ca1d
Create KNX light entities directly from config (#50700)
* create light entities directly from config

* review changes
2021-05-16 22:45:28 +02:00
Matthias Alphart 3200b0150a
Create KNX notify entities directly from config (#50709) 2021-05-16 12:07:44 +02:00
Matthias Alphart 1e11bfae05
Create KNX fan entities directly from config (#50702) 2021-05-16 08:34:14 +02:00
Matthias Alphart 222336a1db
Create KNX scene entities directly from config (#50686) 2021-05-16 08:14:28 +02:00
tkdrob 1160a5f239
Add targets and selectors for services (I-K) (#50542)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-14 20:34:59 +02:00
Matthias Alphart 13a27eec90
Fix KNX climate unque_id (#50054) 2021-05-04 14:45:25 -07:00
Ruslan Sayfutdinov 786c5db5be
Use AddEntitiesCallback type, pt.4 (#49955) 2021-05-04 14:50:06 +02:00
Matthias Alphart cfabb06a7a
Add color modes to KNX light (#49883)
* color_modes support

* return brightness for color lights

even when no brightness address is set

* apply brightness for color lights

* remove unneeded constants
2021-05-03 11:28:02 +02:00
Matthias Alphart 0a6f981b4c
Fix KNX light unique_id (#49967)
* migrate light unique_id

* review changes
2021-05-03 11:12:06 +02:00
Matthias Alphart 78befcd3fd
Fix KNX unique_id (#49677)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-28 15:50:01 +02:00
Matthias Alphart 7acb16e2af
KNX Schema improvements (#49678) 2021-04-26 14:36:01 +02:00
Ruslan Sayfutdinov 37466ae423
Don't ignore mypy errors by default (#49270) 2021-04-26 14:23:21 +02:00
Matthias Alphart 671148b6ca
Update xknx to version 0.18.1 (#49609) 2021-04-24 14:18:14 +02:00
Marc Mueller c07646db5d
Update typing syntax (#49480)
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
Franck Nijhof 055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
Matthias Alphart 985b4a581a
Create KNX switch entity directly from config (#49238) 2021-04-15 09:47:43 +02:00
Marvin Wichmann 21744790d3
Add KNX source address to Sensor and BinarySensor (#48857)
* Add source address to Sensor and BinarySensor

* Fix typing

* Review: Always use UTC time in state attributes

* Review: Add missing UTC conversion in sensor
2021-04-10 18:12:43 +02:00
Marvin Wichmann 91837f08ce
Update xknx to version 0.18.0 (#48799) 2021-04-08 14:54:43 +02:00
Marvin Wichmann 9e1a17c62e
Update xknx to version 0.17.5 (#48522)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-03-31 17:04:22 +02:00
Matthias Alphart 338be8c70b
KNX passive group addresses (#48009) 2021-03-30 18:14:38 +02:00
Matthias Alphart 051f29f9b6
Remove KNX type alias for homeassistant.core types (#48422) 2021-03-27 22:20:11 +01:00
Matthias Alphart 8fa935234a
Type check KNX integration __init__ and knx_entity (#48044) 2021-03-26 16:10:55 +01:00
mptei 02b0a4ca1f
Xknx unneeded expose (#48311) 2021-03-26 14:51:36 +01:00
Matthias Alphart de1fa706a0
xknx 0.17.4 (#48350) 2021-03-26 08:07:57 +01:00
Matthias Alphart 6b2a2740f1
Type check KNX integration climate (#48054) 2021-03-25 09:47:49 +01:00
plomosits 18e6816373
Improve Docker and Kubernetes support for KNX (#48065)
Co-authored-by: Matthias Alphart <farmio@alphart.net>
2021-03-22 20:03:57 +01:00
Erik Montnemery fdf97eaca3
Migrate integrations i-m to extend SensorEntity (#48213) 2021-03-22 19:59:03 +01:00
Matthias Alphart 70bebc51f2
Type check KNX integration cover (#48046) 2021-03-19 22:25:20 +01:00
Matthias Alphart 16a4f05e27
Type check KNX integration fan (#48056) 2021-03-19 20:55:08 +01:00
Matthias Alphart 66b537c0e3
Type check KNX integration factory and schema (#48045)
these are used non-optional anyway
get them per config[] notation
2021-03-19 10:23:50 +01:00
Matthias Alphart e522b311ce
Type check KNX integration binary_sensor, sensor and switch (#48050) 2021-03-19 10:22:18 +01:00
Matthias Alphart fb1e76db8c
Type check KNX integration light (#48053)
* type check light

* review changes
2021-03-19 10:21:06 +01:00
Matthias Alphart 943ce8afaf
Type check KNX integration weather, notify and scene (#48051) 2021-03-19 10:16:27 +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 a4075d9e11
KNX sensor: float no longer valid for `type` (#48005) 2021-03-16 21:33:56 +01:00
Matthias Alphart 7ed9e5b2c2
Update xknx to 0.17.3 (#47996) 2021-03-16 16:43:11 +01:00
Erik Montnemery 14a59d290a
Update integrations j-o to override extra_state_attributes() (#47758) 2021-03-11 20:11:25 +01:00
Matthias Alphart 54a9b69ecb
Update xknx to 0.17.2 (#47732) 2021-03-10 10:32:22 -10:00
Matthias Alphart ce8871ef59
KNX remove custom deprecation warnings (#47238) 2021-03-03 00:50:40 +01:00
Ville Skyttä dc880118a4
Lint suppression cleanups (#47248)
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
Matthias Alphart 3fda9fd0c6
KNX address constant (#47196) 2021-03-01 21:59:36 +01:00
Matthias Alphart dadc99dbd3
Deprecate knx config_file (#46874)
* deprecate config_file

* removed cv.deprecated for now, added persistent notification

* Update homeassistant/components/knx/__init__.py

Co-authored-by: Philip Allgaier <philip.allgaier@gmx.de>

* remove notification, add cv.deprecated again

* Update homeassistant/components/knx/__init__.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* remove cv.deprecated again

Co-authored-by: Philip Allgaier <philip.allgaier@gmx.de>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-03-01 11:55:55 +01:00
Matthias Alphart 92afcb6b4b
KNX services send and event_register accept multiple group addresses (#46908)
* send and event_register service accept lists of group addresses

* remove lambda

* object selector for lists

* knx.read takes lists too
2021-03-01 11:51:59 +01:00
Marc Mueller 16dcbf1467
Update pylint (#47205) 2021-02-28 22:09:01 -10:00
Matthias Alphart a632215541
Validate KNX addresses (#46933) 2021-02-24 08:37:41 +01:00
Matthias Alphart d02b27a5d0
Update xknx to 0.17.1 (#46974) 2021-02-23 16:26:17 -08:00
Matthias Alphart b583ded8b5
Fix KNX services.yaml (#46897) 2021-02-23 22:59:16 +01:00
Philip Allgaier 7a7147edcf
Add stop tilt support to KNX (#46947) 2021-02-23 16:34:02 +01:00
Matthias Alphart 1a27af43cc
Add KNX service exposure_register (#45257) 2021-02-21 19:38:17 -10:00
Martin 6bb848455f
Add open/close tilt support to KNX cover (#46583) 2021-02-20 09:09:43 -10:00