Commit Graph

739 Commits (51c6a68036acb91bce72beb94f366d583d5a2b6a)

Author SHA1 Message Date
Robert Svensson 3d05a9d31f
Streamline setup of deCONZ lock from sensor platform (#71707) 2022-05-13 10:38:36 +02:00
Robert Svensson bed2d1e37b
Streamline setup of deCONZ climate platform (#71708) 2022-05-13 09:51:19 +02:00
J. Nick Koston 24a0007785
Add additional context data to logbook events (#71721) 2022-05-12 17:21:14 -07:00
Robert Svensson 554f079b02
Streamline setup of deCONZ switch platform (#71661) 2022-05-11 13:31:16 +02:00
Robert Svensson 44f8c555a6
Streamline setup of deCONZ siren platform (#71660) 2022-05-11 13:30:16 +02:00
Robert Svensson db17d7aecf
Streamline setup of deCONZ lock from light platform (#71659) 2022-05-11 13:20:09 +02:00
Robert Svensson 920c0d1667
Streamline setup of deCONZ cover platform (#71656) 2022-05-11 13:19:28 +02:00
Robert Svensson b9f3f1af6c
Streamline setup of deCONZ fan platform (#71658) 2022-05-11 13:18:20 +02:00
GitHub Action 3de7ffde54 [ci skip] Translation update 2022-05-10 00:23:19 +00:00
Robert Svensson b731b7b69c
Bump pydeconz to v92 (#71613) 2022-05-10 00:03:03 +02:00
Jelte Zeilstra d52137cc1a
Add state class measurement to deCONZ LightLevel sensors (#71516) 2022-05-08 15:54:43 +02:00
GitHub Action 07706fa62a [ci skip] Translation update 2022-05-06 00:22:16 +00:00
GitHub Action 2b3fc97020 [ci skip] Translation update 2022-05-05 00:22:23 +00:00
GitHub Action c594de25f7 [ci skip] Translation update 2022-05-03 00:23:56 +00:00
Robert Svensson 37b59dfcc0
Make sure sensor state value is not None prior to trying to used the scaled value (#71189) 2022-05-02 10:51:19 +03:00
GitHub Action 9b10658d01 [ci skip] Translation update 2022-05-02 00:22:04 +00:00
GitHub Action ba386b5841 [ci skip] Translation update 2022-05-01 00:28:25 +00:00
Robert Svensson a0fe5b0247
Make deCONZ SSDP discovery more strict by matching on manufacturerURL (#71124) 2022-04-30 19:33:47 +02:00
Robert Svensson 1396213d78
Fix copy paste issue leaving one device trigger with a wrong subtype (#71121) 2022-04-30 19:26:14 +03:00
GitHub Action d01666f3a2 [ci skip] Translation update 2022-04-30 00:25:25 +00:00
Robert Svensson 7f094a928b
Fix linking issue when deCONZ gateway is not unlocked (#71082) 2022-04-29 15:34:33 -07:00
Robert Svensson 865c75b631
Don't rely on deCONZ gateway object in config options flow (#71079) 2022-04-29 23:57:38 +03:00
Robert Svensson e1f4b17971
Pydeconz raise ResponseError when deCONZ Rest API Plugin is not yet ready (#71078) 2022-04-29 23:55:55 +03:00
GitHub Action 348016dbbf [ci skip] Translation update 2022-04-29 00:22:21 +00:00
Robert Svensson 408946cfee
Bump pydeconz to v91 (#71030) 2022-04-28 14:09:35 -07:00
Robert Svensson bd8e705252
Streamline setup of deCONZ light platform (#70822) 2022-04-26 16:06:01 -07:00
Robert Svensson fe3fb230be
Streamline setup of deCONZ group platform (#70712) 2022-04-26 11:44:47 +02:00
Robert Svensson f7d9797c62
Streamline setup of deCONZ scene platform (#70700) 2022-04-26 11:42:56 +02:00
epenet 9dcbc8469e
Use climate enums in deconz (#70630)
* Use climate enums in deconz

* Adjust tests

* Adjust type hint

* Update climate.py

* Update climate.py

* Update climate.py

* Don't edit files in Github!
2022-04-25 16:18:44 +02:00
Robert Svensson 8eae572c93
Mark type "On/Off Switch" as a deCONZ switch entity (#70598)
Convert entity types of light platform to switch platform
2022-04-25 08:25:38 +02:00
Robert Svensson b15387ffb9
Remove migration of entities from deCONZ switch to siren platform (#70600) 2022-04-24 23:32:13 +02:00
Robert Svensson 0726bc2cab
Streamline setup of deCONZ button platform (#70593)
* Streamline setup of deCONZ button platform

* Update homeassistant/components/deconz/button.py

Co-authored-by: J. Nick Koston <nick@koston.org>

Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-24 22:58:36 +02:00
Robert Svensson 8330d7906a
Streamline setup of deCONZ alarm control panel platform (#70589) 2022-04-24 21:25:01 +02:00
Robert Svensson 790beb1346
Move deCONZ light imports to reflect changes in pydeconz (#70469) 2022-04-24 10:27:56 +02:00
Robert Svensson 009111151d
Move deCONZ alarm system imports to reflect the changes in pydeconz (#70453) 2022-04-24 10:17:46 +02:00
Robert Svensson 83fde83279
Move deCONZ group and scene imports to reflect the changes in pydeconz (#70468)
* Move deCONZ scene imports to reflect the changes in pydeconz

* Move deCONZ group imports to reflect the changes in pydeconz

* Use common resourcegroup rather than 5 different imports in gateway
2022-04-24 10:09:58 +02:00
Robert Svensson 301dcaae63
Move deCONZ sensor imports to reflect changes in pydeconz (#70471) 2022-04-23 22:59:51 +03:00
Robert Svensson 678888c65f
deCONZ dependency exports type hints (#70449) 2022-04-22 19:27:47 -10:00
epenet 5ec855e020
Use ColorMode enum in deconz (#70431) 2022-04-22 17:50:00 +02:00
Robert Svensson 69f4aeaf42
Enable strict typing of deconz_device (#70341)
* Enable strict typing of deconz_device completing strict typing of deconz integration
2022-04-22 09:19:35 +02:00
Robert Svensson 78b02fe0ce
Enable strict typing for deCONZ platforms (#70290) 2022-04-20 09:03:53 +02:00
Robert Svensson 7bc9d01520
Enable strict typing for deCONZ platforms cover+lock+siren+switch (#69930) 2022-04-19 18:14:56 +02:00
Robert Svensson 506be5a818
Enable strict typing for deCONZ platforms binary_sensor+fan+logbook+number (#70171) 2022-04-19 10:32:57 +02:00
Franck Nijhof 1e4aacaeb1
Replace Alarm Control Panel FORMAT_ constants with CodeFormat enum (#69861) 2022-04-18 19:37:32 +02:00
Robert Svensson b6cf65decb
Improve typing of deCONZ sensor platform (#70161) 2022-04-17 20:58:42 +03:00
Robert Svensson f0b1d35562
Address late review of deconz climate (#70148)
* Fix late comment

* Avoid unnecessary properties

* Add clip sensor test to increase coverage of climate

* Fix review_comment
2022-04-16 21:14:54 +02:00
Robert Svensson f8367d3c01
Improve typing of config flow (#69438) 2022-04-15 23:04:56 +02:00
Robert Svensson c920d7d5e0
Improve typing of deCONZ diagnostics (#69491)
* Improve typing of deCONZ diagnostics

homeassistant/components/deconz/diagnostics.py:28: error: Item "None" of "Optional[WSClient]" has no attribute "state"  [union-attr]
homeassistant/components/deconz/diagnostics.py:40: error: Unpacking a string is disallowed  [misc]
homeassistant/components/deconz/diagnostics.py:40: error: Cannot determine type of "k"  [has-type]
homeassistant/components/deconz/diagnostics.py:40: error: Cannot determine type of "v"  [has-type]
homeassistant/components/deconz/diagnostics.py:42: error: Unpacking a string is disallowed  [misc]
homeassistant/components/deconz/diagnostics.py:42: error: Cannot determine type of "k"  [has-type]
homeassistant/components/deconz/diagnostics.py:42: error: Cannot determine type of "v"  [has-type]

* Fix review comments

* These mypy ignores arent useful until py.typed is introduced with the library which I will do once I resolve as much as possible in the integration
2022-04-14 23:04:32 +02:00
Robert Svensson 66265b6e9a
Improve typing of deCONZ light platform (#69886)
homeassistant/components/deconz/light.py:66: error: Incompatible types in assignment (expression has type "List[Union[ConfigurationTool, Cover, Fan, Light, Lock, Siren]]", variable has type "Optional[List[Light]]")  [assignment]
homeassistant/components/deconz/light.py:68: error: Item "None" of "Optional[List[Light]]" has no attribute "__iter__" (not iterable)  [union-attr]
homeassistant/components/deconz/light.py:159: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode"  [union-attr]
homeassistant/components/deconz/light.py:159: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode"  [union-attr]
homeassistant/components/deconz/light.py:161: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode"  [union-attr]
homeassistant/components/deconz/light.py:161: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode"  [union-attr]
homeassistant/components/deconz/light.py:163: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode"  [union-attr]
homeassistant/components/deconz/light.py:163: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode"  [union-attr]
homeassistant/components/deconz/light.py:165: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "brightness"  [union-attr]
homeassistant/components/deconz/light.py:165: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "brightness"  [union-attr]
homeassistant/components/deconz/light.py:174: error: Unused "type: ignore" comment
homeassistant/components/deconz/light.py:174: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "brightness"  [union-attr]
homeassistant/components/deconz/light.py:174: note: Error code "union-attr" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:174: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "brightness"  [union-attr]
homeassistant/components/deconz/light.py:179: error: Unused "type: ignore" comment
homeassistant/components/deconz/light.py:179: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_temp"  [union-attr]
homeassistant/components/deconz/light.py:179: note: Error code "union-attr" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:179: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_temp"  [union-attr]
homeassistant/components/deconz/light.py:179: error: Incompatible return value type (got "Union[int, None, Any]", expected "int")  [return-value]
homeassistant/components/deconz/light.py:179: note: Error code "return-value" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:184: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "hue"  [union-attr]
homeassistant/components/deconz/light.py:184: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "hue"  [union-attr]
homeassistant/components/deconz/light.py:184: error: Unsupported operand types for / ("None" and "int")  [operator]
homeassistant/components/deconz/light.py:184: note: Left operand is of type "Union[int, None, Any]"
homeassistant/components/deconz/light.py:184: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "saturation"  [union-attr]
homeassistant/components/deconz/light.py:184: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "saturation"  [union-attr]
homeassistant/components/deconz/light.py:189: error: Unused "type: ignore" comment
homeassistant/components/deconz/light.py:189: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "xy"  [union-attr]
homeassistant/components/deconz/light.py:189: note: Error code "union-attr" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:189: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "xy"  [union-attr]
homeassistant/components/deconz/light.py:194: error: Unused "type: ignore" comment
homeassistant/components/deconz/light.py:194: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "state"  [union-attr]
homeassistant/components/deconz/light.py:194: note: Error code "union-attr" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:194: error: Incompatible return value type (got "Union[bool, None, Any]", expected "bool")  [return-value]
homeassistant/components/deconz/light.py:194: note: Error code "return-value" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:228: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "set_state"  [union-attr]
homeassistant/components/deconz/light.py:228: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "set_state"  [union-attr]
homeassistant/components/deconz/light.py:228: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, float, int, str, Tuple[float, float]]]"; expected "Union[str, None, Literal['none', 'select', 'lselect']]"  [arg-type]
homeassistant/components/deconz/light.py:228: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, float, int, str, Tuple[float, float]]]"; expected "Optional[int]"  [arg-type]
homeassistant/components/deconz/light.py:228: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, float, int, str, Tuple[float, float]]]"; expected "Union[str, None, Literal['colorloop', 'none']]"  [arg-type]
homeassistant/components/deconz/light.py:228: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, float, int, str, Tuple[float, float]]]"; expected "Optional[bool]"  [arg-type]
homeassistant/components/deconz/light.py:228: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, float, int, str, Tuple[float, float]]]"; expected "Optional[Tuple[float, float]]"  [arg-type]
homeassistant/components/deconz/light.py:232: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "state"  [union-attr]
homeassistant/components/deconz/light.py:245: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "set_state"  [union-attr]
homeassistant/components/deconz/light.py:245: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "set_state"  [union-attr]
homeassistant/components/deconz/light.py:245: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, int, str]]"; expected "Union[str, None, Literal['none', 'select', 'lselect']]"  [arg-type]
homeassistant/components/deconz/light.py:245: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, int, str]]"; expected "Optional[int]"  [arg-type]
homeassistant/components/deconz/light.py:245: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, int, str]]"; expected "Union[str, None, Literal['colorloop', 'none']]"  [arg-type]
homeassistant/components/deconz/light.py:245: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, int, str]]"; expected "Optional[bool]"  [arg-type]
homeassistant/components/deconz/light.py:245: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, int, str]]"; expected "Optional[Tuple[float, float]]"  [arg-type]
2022-04-14 23:31:48 +03:00
Robert Svensson 87551b7880
Improve typing of deCONZ climate platform (#69882)
* Improve typing of deCONZ climate platform

homeassistant/components/deconz/climate.py:153: error: Dict entry 0 has incompatible type "str": "bool"; expected "str": "str"  [dict-item]
homeassistant/components/deconz/climate.py:154: error: Dict entry 1 has incompatible type "str": "bool"; expected "str": "str"  [dict-item]
homeassistant/components/deconz/climate.py:176: error: Argument 1 to "get" of "Mapping" has incompatible type "Optional[Literal['off', 'low', 'medium', 'high', 'on', 'auto', 'smart']]"; expected "str"  [arg-type]
homeassistant/components/deconz/climate.py:200: error: Argument 1 to "get" of "Mapping" has incompatible type "Optional[Literal['off', 'auto', 'cool', 'heat', 'emergency heating', 'precooling', 'fan only', 'dry', 'sleep']]"; expected "str"  [arg-type]
homeassistant/components/deconz/climate.py:218: error: Argument 1 to "set_config" of "Thermostat" has incompatible type "**Dict[str, str]"; expected "Optional[int]"  [arg-type]
homeassistant/components/deconz/climate.py:218: error: Argument 1 to "set_config" of "Thermostat" has incompatible type "**Dict[str, str]"; expected "Optional[bool]"  [arg-type]
homeassistant/components/deconz/climate.py:218: error: Argument 1 to "set_config" of "Thermostat" has incompatible type "**Dict[str, str]"; expected "Optional[List[str]]"  [arg-type]
homeassistant/components/deconz/climate.py:225: error: Argument 1 to "get" of "Mapping" has incompatible type "Optional[Literal['holiday', 'auto', 'manual', 'comfort', 'eco', 'boost', 'complex']]"; expected "str"  [arg-type]
homeassistant/components/deconz/climate.py:244: error: Unused "type: ignore" comment
homeassistant/components/deconz/climate.py:250: error: Unused "type: ignore" comment
homeassistant/components/deconz/climate.py:253: error: Unused "type: ignore" comment

* Simplify populating supported_hvac_modes
Fix tests
2022-04-14 23:19:42 +03:00