Commit Graph

51 Commits (58942601b4f012abc361357f71f0efa63d2ab998)

Author SHA1 Message Date
Michael Kowalchuk 15bf4dae9b
Add zwave_js speed configurations for GE/Jasco 12730 and 14287 fans (#60517) 2021-11-29 08:27:32 +01:00
Michael Kowalchuk 74cfbf5f42
Use configured speed ranges for HomeSeer FC200+ fan controllers in zwave_js (#59697)
* Use configured speed ranges for HomeSeer FC200+ fan controllers in zwave_js

* Fix pylint errors

* Remove unused param in tests

* Fix test values

* Address various review notes

* Remove now-redundant assertion

* Add an additional test case for set_percentage=0

* Use round() instead of int() for percentage computations; this makes the percentage setting match the setpoints in the UI

* Add additional tests

* Fix pct conversions

* Make conversion tests exhaustive

* Add tests for discovery data templates

* Revert "Add tests for discovery data templates"

This reverts commit 85dcbc0903.

* Improve typing on ConfigurableFanSpeedDataTemplate#resolve_data

* Move config error handling to the discovery data template

* Fix checks for config data

* Revise fallback logic in percentage_to_zwave_speed and ensure that the speed list is non-empty

* Rework error handling

* Fix runtime fan speed updates

* Use warning instead of warn

* Move data validation to get_speed_config; turns out that resolve_data is only called once, at startup.

* Temporarily remove the not-yet-used fixed fan speed template.  Add an additional assertion to ensure speeds are sorted.

* Add a comment about the assertions in discovery_data_template.py

* Update homeassistant/components/zwave_js/discovery_data_template.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Fix typo in comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-24 11:31:59 +01:00
Paul Frank 3705f2f7f1
Open and close tilt for Fibaro devices in zwave_js (#58435)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-28 22:30:34 +02:00
Raman Gupta e9d25974b8
Switch to using constants wherever possible in zwave_js (#56518) 2021-09-30 02:21:53 +02:00
Raman Gupta 8716aa011a
Add support for multilevel switch CC select entities (#56656)
* Add support for multilevel switch CC select entities

* Use state names from docs and include more device identifiers from device DB

* black

* pylint

* type fix

* Add failure scenario test

* Update homeassistant/components/zwave_js/select.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-26 14:22:41 -04:00
Raman Gupta c785983cce
Handle entity creation on new added zwave_js value (#55987)
* Handle new entity creation when a new value is added

* spacing

* Update homeassistant/components/zwave_js/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* change variable name and use asyncio.gather

* Centralized where discovered value IDs gets managed

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-10 23:49:31 +02:00
Raman Gupta 331726ec2f
Bump zwave-js-server-python to 0.29.1 (#55460) 2021-08-30 09:40:56 -07:00
Raman Gupta ebc2a0103e
Make zwave_js discovery log message more descriptive (#55432) 2021-08-29 20:25:47 -07:00
Raman Gupta 1f2134a31a
Use entity descriptions for zwave_js sensors (#53744)
* Use entity descriptions for zwave_js sensors

* reorder

* use new type

* revert typing changes

* switch to using maps

* Get device and state class from discovery instead

* ues constants for keys

* Add meter type attribute and simplify platform data access

* comments

* second refactor

* Add None lookup value

* readability

* Switch base data template to type Any for more flexibility

* Additional changes based on feedback

* rewrite based on new upstream util functions

* Use new combo type

* Handle UnknownValueData in discovery

* bug fixes

* remove redundant comment

* re-add force_update

* fixes and tweaks

* pylint and feedback
2021-08-20 16:25:39 -04:00
Raman Gupta cff6883b5c
Add zwave_js Protection CC select entities (#54717)
* Add Protection CC select entities

comment

* Disable entity by default

* use class attribute

* Enable protection entity by default

* add guard for none
2021-08-17 12:22:27 -04:00
Raman Gupta 013b998974
Relax zwave_js lock discovery rules to cover more use cases (#54710) 2021-08-17 13:34:00 +02:00
Raman Gupta a41ee9e870
Create zwave-js select platform and discover additional siren values (#53018)
* Create zwave-js select platform and add siren values to number and select platforms

* use constants while we wait for lib release

* comments

* rename stuff in tests to prepare for protection CC PR

* Switch to 0-1 range for number entity

* Update homeassistant/components/zwave_js/number.py

Co-authored-by: kpine <keith.pine@gmail.com>

* Change step

* Switch to ToneID

* Better error handling

* Add test for coerage

Co-authored-by: kpine <keith.pine@gmail.com>
2021-08-16 13:36:20 -04:00
Raman Gupta 61ab2b0c60
Use zwave_js.number platform for Basic CC values (#54512)
* Use zwave_js.number platform for some Basic CC values

* Remove Basic CC sensor discovery schema

* update comment

* update comment
2021-08-16 12:30:52 -04:00
Raman Gupta 30cbf03b48
Add energy support for zwave_js meter CC entities (#53665)
* Add energy support for zwave_js meter CC entities

* shrink

* comments

* comments

* comments

* Move attributes

* Add tests

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-07-29 14:18:38 +02:00
Raman Gupta 1019ee22ff
Add enabled attribute to zwave_js discovery model (#53645)
* Add attribute to zwave_js discovery model

* Fix binary sensor entity enabled logic

* Add tests
2021-07-29 09:30:50 +02:00
Raman Gupta 1f15181522
Add support for Z-Wave JS siren (#52948)
* Add support for Z-Wave JS siren

* Add additional device class to discovery

* fix docstring

* Remove device class specific part of discovery schema

* rename test

* switch to entry.async_on_remove

* Fix logic based on #52971

* Use constants to unblock PR

* Add support to set volume level

* Update homeassistant/components/zwave_js/siren.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-07-14 10:14:13 -04:00
Dror Eiger 0556c35e24
Set zwave_js cover device_class for shutters and blinds (#50643)
* Set device_class for shutters and blinds

* Add missing. imports

* Add tests for device class setting

* Clean up

* Avoid storing the node in an unused variable

* Fix entity name

* Extend qubino shutter discovery

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-16 08:26:16 +02:00
Raman Gupta 1b81849271
Add zwave_js support for HeatIt Z-TRM2fx (#50317)
* Add zwave_js support for HeatIt Z-TRM2fx

* fix docstring

* use AwesomeVersion to support firmware version ranges

* add guard against empty firmware range

* switch guard approach to raise exception sooner

* make post init more generic

* Set up firmware range schema as AwesomeVersion during initialization

* Update homeassistant/components/zwave_js/discovery.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Allow min_ver and max_ver to be None

* fix docstring

* reduce import scope

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-09 15:28:35 -04:00
Raman Gupta fdc29d6a80
Add device specific discovery for Heatit Z-TRM3 thermostat (#49804)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-30 16:10:25 +02:00
Raman Gupta 1cb907c2e3
Add zwave_js discovery schema for Vision Security ZL7432 (#49510)
* Add zwave_js discovery schema for Vision Security ZL7432

* add tests

* fix test

* add correct fixture

* Make discussed changes

* fix tests

* move event handler

* fix logic to get entity ID

* add test

* make discovery test more explicit

* remove domain from event data

* always provide entity_id key to make automations easier and translate value if possible

* formatting

* comment

* dont overwrite value
2021-04-28 10:22:54 +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
Raman Gupta fbc3f97097
Add support for selective config parameter entity discovery (#48336)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-27 18:14:06 +01:00
Franck Nijhof f4cc4a0896
Merge of nested IF-IF cases - X-Z (#48373) 2021-03-26 17:08:05 +01:00
Marc Mueller dcca29ef68
Update typing 14 (#48078) 2021-03-18 15:08:35 +01:00
Chris 6d478804e7
Add LZW36 device schema to zwave_js discovery (#47314)
* Add LZW26 device schema to discovery

Co-authored-by: @kpine

* Update homeassistant/components/zwave_js/discovery.py

Co-authored-by: kpine <keith.pine@gmail.com>

* Add tests

* Fix test

Co-authored-by: kpine <keith.pine@gmail.com>
2021-03-04 00:32:37 +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
Marcel van der Veldt 7ca148f65d
Fix Z-Wave JS discovery schema for thermostat devices (#47087)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-26 11:19:23 -08:00
Raman Gupta a43f3c1a0c
Fix zwave_js unique ID migration logic (#47031) 2021-02-24 23:14:32 -08:00
Marcel van der Veldt 23cbd2dda3
Change Z-Wave JS discovery logic to adopt changes to DeviceClass (#46983)
Co-authored-by: raman325 <7243222+raman325@users.noreply.github.com>
2021-02-24 12:59:06 -08:00
Marcel van der Veldt 868a536d81
Add number platform to Z-Wave JS (#46956)
* add number platform to zwave_js integration
* add discovery scheme for thermostat valve control, using number platform

Co-authored-by: kpine <keith.pine@gmail.com>
2021-02-24 19:39:35 +01:00
Marcel van der Veldt d4d68ebc64
Extend zwave_js discovery scheme for lights (#46907) 2021-02-23 16:31:24 -08:00
kpine 2ae790283c
Detect iBlinds v2.0 switch value as a cover not light (#46807)
* Remove unused "fibaro_fgs222" discovery hint

* Simplify multilevel switch current value discovery schema

* Force iBlinds v2.0 devices to be discovered as cover entities

* Rename discovery test file
2021-02-20 19:52:23 +01:00
Jesse Campbell 12477c5e46
Fix missing color switch specific device class for Z-Wave JS driver >6.3 (#46718) 2021-02-18 07:58:43 -05:00
Gaetan Semet 4ab0151fb1
Discover HRT4-ZW / SRT321 SetPoint in zwave_js (#46625)
Missing a specific class to allow discovery of the setpoint command.

Fix #46570

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
2021-02-17 15:06:16 +01:00
kpine dfa973f9ef
Add barrier covers to zwave_js integration (#46379) 2021-02-14 13:24:29 +01:00
Marcel van der Veldt b7dd9bf58f
Enhance platform discovery for zwave_js (#46355) 2021-02-12 13:29:11 +01:00
Marcel van der Veldt 829131fe51
Update zwave_js discovery scheme for boolean sensors in the Alarm CC (#46085) 2021-02-08 11:57:22 -05:00
Marcel van der Veldt be779d8712
update discovery scheme for zwave_js light platform (#46082) 2021-02-08 11:56:19 -05:00
Tobias Sauerwein 5615ab4c25
Add support for climate setpoint thermostats to zwave_js (#45890) 2021-02-03 13:59:19 +01:00
Marcel van der Veldt 9998fe3684
Update discovery scheme for Meter CC in zwave_js integration (#45897) 2021-02-03 13:08:00 +01:00
Marcel van der Veldt 0e3ba532c7
Update zwave_js discovery schema for light platform (#45861) 2021-02-02 10:18:44 +01:00
Marcel van der Veldt 0feda9ce63
Fix sensor discovery for zwave_js integration (#45834)
Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
2021-02-02 10:06:09 +01:00
kpine daddb76e1d
Fix zwave_js Color Switch Device Type discovery for RGB dimmers (#45571) 2021-01-26 18:39:56 +01:00
Ian Tewksbury 666a94a8e1
Add zwave_js ZWavePropertyBinarySensory (#45504) 2021-01-25 15:50:21 +01:00
Chris 68e7ecb74b
Add zwave-js fan platform (#45439)
* Add zwave-js fan platform

* Update remaining tests

* Missing awaits, tests fixed

* Fix typing

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-23 00:11:32 +01:00
Chris 198b875a6f
Add cover platform to zwave js (#45193) 2021-01-22 11:51:39 -05:00
Raman Gupta b2f914823d
Add climate platform to zwave_js (#45177)
* add zwave_js support for climate

* fix

* add fixture

* rename fixture

* fix variable name error

* add tests

* fix tests and handle set_temp properly based on unit

* update call being tested

* fix tests

* improve coverage

* fix docstring

* address review comments

* fix test

* update enum class name

* bump zwave-js-server-python version and assume primary_value is always set

* add additional coverage

* fix docstrings and move populating modes/presets into initialization

* attempt to address comments

* improve comment

* move mode value into a variable so its easier to iterate in the future

* dont assume mode as a discovery point

* assume all values are available when node is ready

* fix order of operations

* switch to valueerror

* use primary value

* readd property and type to discovery schema
2021-01-18 03:45:06 +01:00
Raman Gupta 562d30319b
Add lock platform to zwave_js (#45175)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-16 11:43:25 -05:00
Marcel van der Veldt 071c8cc67d
Add binary_sensor platform to zwave_js (#45081)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-15 09:15:03 -05:00
Charles Garwood f312b87a3f
Add switch platform to zwave_js (#45046) 2021-01-11 18:40:39 -05:00