Commit Graph

34 Commits (148a7ff50cd2fbd9b05c2e8928459b546eeb98ef)

Author SHA1 Message Date
Chris de300ddd56
Clean up some of the ozw tests (#41578)
* Remove some unnecessary fixtures and combine csv dumps
2020-10-10 09:45:20 +02:00
Raman Gupta 06306f5dfe
Add OZW WS API support for locks (#41186)
* add WS API support for locks and simplify lock service calls

* move return outside of try blocK

* fix rebase conflicts
2020-10-06 14:20:48 +02:00
Raman Gupta 6db4075a23
Add OZW node config parameters websocket commands (#40527)
* add websocket commands to retrieve and set config parameters for a node

* move set_config_parameter into generic function and refactor service and WS API

* add payload to return to make service call behave the same way it did before

* create response class

* update error message to pass tests

* move things a bit to reduce LOC

* add tests

* handle logging errors better and make new response class more generic to prepare for lock user code work

* remove unused function parameter

* invert check

* add additional error checking

* refactor a bit to remove repeat code

* revert log msg change

* one more refactor to create generic get_config_parameters function

* change if logic for consistency

* fix test

* add support to provide bool value in set_config_parameter service call

* standardize parameter names on service call

* add test coverage

* fix tests and message sending

* remove unnecessary logging import

* fix one test to get missing coverage

* update per martin and kpines reviews

* remove false assertion

* string line length

* add support for Decimal config param, remove node instance ID as input, and move helper functions to node.py

* cast Decimal appropriately

* revert change to support Decimal for config params since they are not supported as a config param type

* revert to using error arguments to make next PR for WS lock commands easier

* switch to class method and add guard for list Value not being a number

* update logic to use new openzwavemqtt util methods

* add support for bitsets

* use parent exception class

* bump openzwavemqtt version, remove node.py from .coveragerc and put file references in the right place

* add comment

* improve config validation

* remove bitset support from config validation

* re-add bitset support with some additional tests

* move send_result out of try block
2020-10-05 21:47:28 +02:00
springstan c7ebfdb403
Use single_instance_allowed for webhook config flows (#40965) 2020-10-01 20:44:13 +02:00
Chris c693d8af14
Discover additional ozw thermostats lacking mode support (#40799)
* Discover more thermostats without mode support

* Add tests
2020-09-30 21:12:44 +02:00
Chris 1f000e2c3e
Allow setting of hvac_mode when setting temperature in ozw (#39853) 2020-09-09 17:08:43 +02:00
Charles Garwood 4885b22cb4
Improve ozw websocket response when node is not found (#39653)
* Return not_found error over ws if node is not found

* Remove unrelated code from this PR

* Only import ERR_NOT_FOUND from core websocket_api
2020-09-04 15:52:47 -04:00
Charles Garwood c2365b8c0f
Add get_nodes command to OZW websocket api (#39317)
* Add get_nodes command to OZW websocket api

* Fix black

* Use constants for get_nodes and get_node

* Missed a couple constants
2020-08-27 14:00:22 -04:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Chris 7462d140af
Trim CW from RGB when not supported in ozw (#39191)
* Trim the CW value if CW isn't supported

* Trim CW from white level as well
2020-08-23 19:20:37 -04:00
Fritiof Hedman 961f36c679
Add ZwaveStringSensor to OZW integration (#38676)
* Add ZwaveStringSensor to OZW integration

* Remove unnecessary new line

* Set enabled default to false for ZwaveStringSensor

* Add missing decorator for property

* Add a test for ZwaveStringSensor

* Also test state of ZWaveStringSensor

* Remove entity type check
2020-08-23 15:16:26 +02:00
Charles Garwood 993088d26e
Add OZW network_statistics websocket command (#39124)
* Add network_statistics websocket command

* Add tests
2020-08-21 22:52:03 +02:00
Charles Garwood 52d949ec90
Tweak OZW Websocket Instance/Network Responses (#39107) 2020-08-21 18:48:56 +02:00
Charles Garwood 96035ccd6f
Add websocket command to get a list of OZW instances and their status (#39019)
* Add websocket command to get a list of OZW instances and their status

* Add test

* Review comments
2020-08-19 09:37:04 -04:00
Martin Hjelmare 0f1e70ca79
Fix ozw pure rgb dimmer light (#38877)
* Fix ozw pure rgb light

* Add test
2020-08-15 14:41:30 -04:00
Chris 5c9f29c43a
Fix ozw dimming transition (#38850)
* Handle float from light component

* Test with float

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-08-14 08:35:42 -04:00
Charles Garwood 8cf0a01149
Add refresh_node_info command to OZW websocket api (#38573)
* Add ozw refresh_node_info websocket api

* Remove extra unsubs definition

* Remove unused bits from refresh_node_info websocket

* Add tests

* Add unsubscribe test

* Wait for response in unsubscribe test
2020-08-12 15:49:40 -04:00
Chris 597d1e2799
Add missing Short type to set_config_param (#38618)
* Add missing Short type to set_config_param

* Forgot to fix the for loop

* Remove leftover return

* Guard the for loop

* Changed from if to else

* Fixed list iteration for validating input

* Adjusted per linter
2020-08-09 19:05:26 +02:00
Patrick 0780650015
Make ozw CCT use device attributes instead of hard coded values (#38054) 2020-08-04 20:15:21 +02:00
Chris 607ba08e23
Add node neighbors to ozw websocket api (#38447)
* Add node neighbors to websocket api

* Update homeassistant/components/ozw/websocket_api.py

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>

* Update tests/components/ozw/test_websocket_api.py

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>
2020-08-01 15:50:04 -04:00
Charles Garwood 13e8e28778
Add basic websocket api for OZW (#38265) 2020-07-29 22:35:26 +02:00
Chris 5fef9653a8
Fix ozw dimming duration (#38254)
* Dimming duration fix

Fixes #38068 - allows dimming duration to 7620 (default of 7621)

* Forgot to commit my test updates

* Added backwards compatibility with pre-150+ builds

Added tests for backwards compatibility

* Upped the build number cut off

* Add check for major.minor version as well

* Fix major.minor detection

* Adjust variable name

* Adjust version checking logic

* Math is hard

* Rename files, adjust test names

* Update doc string
2020-07-28 07:37:09 +02:00
Patrick 19870ea867
Fix ozw color temp (#38012)
* Fix color temp math

* Ran black --fast

* Update test_light.py

* tweaking mireds

* updating comments

* fixing test_light to match standards

* fixing comments, need coffee
2020-07-20 14:35:30 -04:00
Marcel van der Veldt 24ed932b01
Add ozw support for single setpoint thermostat devices (#37713)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-07-17 14:25:16 +02:00
Chris a6129467aa
Add RGB light support to ozw (#37636) 2020-07-16 18:10:36 -07:00
Chris fd65ce08c1
Add ozw usercode support (#37390) 2020-07-08 16:41:53 -07:00
Chris aa8f3ad307
Add OZW support for set_config_parameter service (#37523)
* Add support for set_config_parameter service

* Adjusted elif to if

* More if/else cleanup

* More if/else cleanup

* Less nesting

* End loop properly

* Added byte type

* Convert break to return
2020-07-08 20:59:52 +02:00
Marcel van der Veldt cbccf011e7
Ozw climate fixes (#37560)
* fix presets and mode conversion

* fix mapping issues in ozw climate

* build mapping table in advance

* Copying a dict to a list copies the keys by default
2020-07-07 16:20:57 -04:00
Chris f6df85f8ce
Add ozw garage door barrier support (#37316) 2020-07-02 21:29:09 +02:00
Michał Mrozek 61475d0a0c
Add support for window covers to ozw integration (#37217)
* feat: add cover to ozw

* fix: imports

* fix: formatting

* fix: improve code regarding comments

* add: cover tests

* fix: add position converting tests

* fix: convert cover position form zwave value

* fix: improve naming

* fix: increase coverage
2020-06-30 13:02:30 +02:00
Charles Garwood ca1e643bdc
Add fan platform to ozw component (#35249)
* Add fan platform

* Add fan discovery schema

* Use constants for dispatcher signal

* Move fan platform to ozw

* Fix fan discovery schema

* Add previous speed to handle value 255

* Make fixture reading more robust

* Add fan tests

* Remove not needed fixture info

* Validate speed

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-26 19:48:39 -04:00
Mariusz Kryński 6fbc3c4a51
Add lock platform to ozw component (#36103)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-05-25 23:51:09 +02:00
Marcel van der Veldt 5bef1c223d
Add climate platform to ozw (#35566) 2020-05-21 11:19:20 +02:00
Franck Nijhof 0be20ec6ab
Rename zwave_mqtt to ozw (#35631) 2020-05-14 22:56:04 +02:00