Commit Graph

67 Commits (6d9f1b3fd3ab964ef6815117b1a23237290ead6c)

Author SHA1 Message Date
Tommaso Marchionni cb5426c1fa Added invert_percent configuration for zwave rollershutter (#23101)
* Added invert_percent configuration for zwave rollershutter

* Added invert_percent configuration for zwave rollershutter

* Fix typo in zwave default configuration
2019-06-17 14:44:47 -07:00
Charles Garwood 1282370ccb Entity Cleanup on Z-Wave node removal (#23633)
* Initial groundwork for entity cleanup on node removal

* Connect node_removed to dispatcher

* update docstring

* Add node_removal test

* Address review comments

* Use hass.add_job instead of run_coroutine_threadsafe
2019-05-19 11:14:11 +02:00
Andrew Loe dbcdc32f05 Ensure Boolean configuration values are handled correctly. (#22810) 2019-04-15 14:24:20 -07:00
Charles Garwood c8375be4b1
Replace get_platform (#23014)
* Update Z-Wave to use async_get_integration

* Change load method per PR comments

* update tests
2019-04-12 12:22:56 -04:00
cgtobi 8cc5cc7f43 Add zwave network key validator (#22785)
* Add zwave network key validator

* Move validator to zwave component

* Move validator to zwave component

* Move stuff

* Move stuff

* Remove helper and replace with voluptuous method

* Add test

* Fix long line

* Improve tests

* Add more negative tests

* Remove unnecessary assertion

* Make the linter happy

* Remove print
2019-04-08 06:18:52 -07:00
Joakim Plate c5de32e7b1 Climate const.py move (#20945)
* Move constants to const.py

* Import from const instead of climate
2019-02-14 20:34:43 +01:00
Paulus Schoutsen 49bab574b9
Clean up Z-Wave pt2 (#20842) 2019-02-07 17:27:31 -08:00
Paulus Schoutsen f3b20d138e Embed Z-Wave platforms (#20810) 2019-02-07 22:50:59 +01:00
Daniel Høyer Iversen ef6b0b8e0b Update flake8 to 3.7.5 (#20761)
* Upgrade flake8

* Upgrade flake8

* Add noqa for hound
2019-02-05 11:12:09 +01:00
Paulus Schoutsen df21dd21f2 RFC: Call services directly (#18720)
* Call services directly

* Simplify

* Type

* Lint

* Update name

* Fix tests

* Catch exceptions in HTTP view

* Lint

* Handle ServiceNotFound in API endpoints that call services

* Type

* Don't crash recorder on non-JSON serializable objects
2018-11-30 21:28:35 +01:00
Charles Garwood b7742999cf
Update Z-Wave Tests asyncio/yield from -> async/await (#18599)
* Update lock tests

* Update binary sensor

* Update zwave component tests
2018-11-20 14:58:03 -05:00
Charles Garwood bcea3a9cba Don't try to re-add existing Z-Wave entities (#17995)
* Keep track of created entities

* lint

* Update tests
2018-11-01 19:38:23 +01:00
Paulus Schoutsen 08fe7c3ece
Pytest tests (#17750)
* Convert core tests

* Convert component tests to use pytest assert

* Lint 🤷‍♂️

* Fix test

* Fix 3 typos in docs
2018-10-24 12:10:05 +02:00
Charles Garwood 9c52a3ce22 Z-Wave Device Registry Support (#17291)
* Add device_registry support for sensor and switch domains

* Add device_registry support for light

* Add device registry to binary_sensor, climate, cover

* Add device registry to zwave fan

* Fix test for config entry loading

* lint

* revert erroneous modification

* Revert device_registry.py change
2018-10-16 14:58:25 +02:00
Charles Garwood cf249e3e5e Z-Wave Config Entry Support (#17119)
* Initial Z-Wave Config Entry Support

* Use conf.get() for config import

* Uncomment test

* Re-add line breaks

* tabs -> space

* Unused import cleanup & lint fixes

* Remove unused config flow link step

* Address comments

* Remove unused import

* Fix tests

* Check for valid usb_path

* Test for Z-Stick in config flow

* Pass config dir to ZWaveOption

* Auto-generate Network Key if none provided

* Test fixes

* Address comments & more start network service registration

* add_executor_job for options.lock()
2018-10-09 16:30:55 +02:00
Jan van Helvoort 7d1960baba Add zwave.network_complete_some_dead event (#16894)
* Add zwave.network_complete_some_dead event

* add missing comma

* typo

* Add SIGNAL_AWAKE_NODES_QUERIED_SOME_DEAD Test

* Add blank lines

* fix linter warnings

Line too long

* remove trailing whitespace

* Change test signal

* Listen to other event
2018-09-28 19:14:57 +02:00
Blake Blackshear 2cc6263092 Add new services for set/refresh Z-Wave device values (#16638)
* Add services for getting and setting indicator values for Z-Wave

* Add service to manually refresh Z-Wave node value by value_id

* Remove refresh_indicator service

* Coerce to int

* Add generic set_node_value service

* Remove set_indicator service
2018-09-27 12:34:42 +02:00
Paulus Schoutsen 4f9fc9b39f Don't create entity registry in tests (#16838) 2018-09-25 10:16:30 +02:00
Glenn Waters 2a85ed7236 Streamline log messages (#16243) 2018-09-18 15:06:52 +02:00
Paulus Schoutsen 994b829cb4
add_devices -> add_entities (#16171)
* add_devices -> add_entities

* Lint

* PyLint

* Revert external method in scsgate
2018-08-24 16:37:30 +02:00
Paulus Schoutsen c7f4bdafc0 Context (#15674)
* Add context

* Add context to switch/light services

* Test set_state API

* Lint

* Fix tests

* Do not include context yet in comparison

* Do not pass in loop

* Fix Z-Wave tests

* Add websocket test without user
2018-07-28 17:53:37 -07:00
Andrey 6c3e2021df Give unknown zwave nodes a better name (#14353)
* Give unknown zwave nodes a better name

* Update util.py
2018-05-28 21:49:38 -04:00
Andrey d1228d5cf4 Look at registry before pulling zwave config values (#14408)
* Look at registry before deciding on ID for zwave values

* Reuse the new function
2018-05-12 17:45:36 -04:00
Andrey 10505d542a Make sure zwave nodes/entities enter the registry is proper state. (#14251)
* When zwave node's info is parsed remove it and re-add back.

* Delay value entity if not ready

* If node is ready consider it parsed even if manufacturer/product are missing.

* Add annotations
2018-05-08 15:30:28 -04:00
Andrey f72d568374 Add unique_id to zwave node entity (#14201)
* Add unique_id to zwave node entity

* Wait 30s before adding zwave node if its unique_id is not ready

* Use only node_id in unique_id. Update name, manufacturer, and product attributes on node update.
2018-05-02 16:10:26 -04:00
John Arild Berentsen fe56844a3a
Bugfix: Zwave Print_node to logfile instead of console (#13302)
* Print to logfile instead of console

* Review changes

* Typo
2018-04-05 11:14:15 +02:00
John Arild Berentsen 5c4529d044
Bugfix: Zwave set_config_parameter failed when config list contained int (#13301)
* Cast list and bool options to STR

* Add button options to STR

* Add TYPE_BUTTON to value types

* Adjust comparison

* Remove Logging

* Remove Empty line

* Update tests

* Update tests

* Mistake
2018-03-20 14:04:24 +01:00
Paulus Schoutsen 5a9013cda5
Refactor Hue: phue -> aiohue (#13043)
* phue -> aiohue

* Clean up

* Fix config

* Address comments

* Typo

* Fix rebase error

* Mark light as unavailable when bridge is disconnected

* Tests

* Make Throttle work with double delay and async

* Rework update logic

* Don't resolve host to IP

* Clarify comment

* No longer do unnecessary updates

* Add more doc

* Another comment update

* Wrap up tests

* Lint

* Fix tests

* PyLint does not like mix 'n match async and coroutine

* Lint

* Update aiohue to 1.2

* Lint

* Fix await MagicMock
2018-03-16 20:27:05 -07:00
Paulus Schoutsen d0f089975d
Run asyncio event loop in debug mode during tests (#13058)
* Run asyncio event loop in debug mode during tests

* Remove debug mode again
2018-03-11 12:32:12 -07:00
Adam Mills dc8424032b
Remove Z-Wave old/new entity_id attributes (#12652) 2018-03-11 10:30:03 -04:00
Paulus Schoutsen e51427b284 Entity registry (#11979)
* Entity#unique_id defaults to None

* Initial commit entity registry

* Clean up unique_id property

* Lint

* Add tests to entity component

* Lint

* Restore some unique ids

* Spelling

* Remove use of IP address for unique ID

* Add tests

* Add tests

* Fix tests

* Add some docs

* Add one more test

* Fix new test…
2018-01-30 10:39:39 +01:00
Otto Winter 8dcfd35b8b Spelling fixes (#12041)
* Spelling fixes

*Lots* of them.

* Spelling breaking changes

* Fix lint errors
2018-01-29 23:37:19 +01:00
Anders Melchiorsen 5b0a475197 Postpone "Z-wave not ready" warning (#11807)
* Release worker thread while waiting for Z-wave startup

* Increase zwave startup timeout

* Adjust test

* Use asyncio.sleep in _check_awaked

* Remove lint

* Name loop parameter
2018-01-24 09:27:58 +01:00
Adam Mills 11ecc2c171
Remove extra info from zwave entity states (#10413)
* Remove extra info from zwave entity states

* Show initializing for nodes that haven't completed queries
2017-11-07 10:13:39 -05:00
John Arild Berentsen c07e651013 Add heal_node and test_node services. (#10369)
* Add heal_node and test_node services.

* lint
2017-11-05 09:19:19 -08:00
John Arild Berentsen cc1979691e Add polling interval service and setting available through zwave node entity panel (#9056)
* Add polling interval to value panel

* Blank lines removal

* Update tests

* Remove old config method

* Raound 1

* Round 2

* Comment spacing

* Expose value_id in attributes
2017-09-11 20:30:48 +02:00
Matthew Breedlove 639eb81aef Adding ZWave CentralScene activation handler. (#9178)
* Adding ZWave CentralScene activation handler.

* Migrated CentralScene logic to node_entity.py

Removed extraneous logging

Modified scene_activated event to send the scene_id and scene_data separately

* Adding unit test for ZWave central scene activation

* Removed return to allow node statistics to update after central scene message is received
2017-09-01 21:41:35 +02:00
Andrey 23273d3e88 Fix zwave power_consumption attribute (#8968) 2017-08-13 18:15:59 -07:00
Paulus Schoutsen 9575cbde09 Consolidate config panels (#8857)
* Remove automation panel registration

* Move Z-Wave config API to config.zwave

* Remove no longer needed test

* Lint

* Update frontend
2017-08-06 12:05:34 -07:00
Adam Mills afb9cba806 Use standard entity_ids for zwave entities (#7786)
* Use standard entity_ids for zwave entities

* Include temporary opt-in for new entity ids

* Update link to blog post

* Update tests

* Add old entity_id as state attribute

* Expose ZWave value details

* Update tests

* Also show new_entity_id

* Just can't win with this one
2017-06-16 13:07:17 -04:00
Adam Mills ae3973144c Discover Z-Wave values by index (#7853)
* Discover Z-Wave values by index

* Add URLs for enums (Some Assembly Required)

* URLs on one line

* Move lint suppression to single line
2017-06-14 08:41:20 -04:00
Adam Mills 9c9f5068b7 Support for renaming ZWave values (#7780)
* Support for renaming ZWave values

* Improve test
2017-06-02 23:03:00 -07:00
Adam Mills e0712ba329 Expose the node name on the zwave node entity (#7787) 2017-06-01 22:33:16 -07:00
Adam Mills 9e9705d6b2 Support for GE Zwave fan controller (#7767)
* Support for GE Zwave fan controller

* Tests for zwave fan

* Add additional fan workarounds
2017-05-25 22:55:00 -07:00
Adam Mills 65c3201fa6 Rename of the zwave hass.data constants (#7768)
* Rename of the zwave hass.data constants

* Remove zwave since it is already implied
2017-05-25 21:11:02 -07:00
John Arild Berentsen 4a0d6e73f4 ZWave: Add reset service to meters (#7676)
* Add reset service for command_class meters.

* Add reset service for command_class meters.

* cast index to const.py
2017-05-21 20:15:24 +02:00
Andrey 927024714b Zwave: Apply refresh_node workaround on 1st instance only (#7579)
* Apply refresh_node workaround on 1st instance only

* Add another test
2017-05-21 17:33:42 +03:00
John Arild Berentsen 88ffe39945 Final tweaks for Zwave panel (#7652)
* # This is a combination of 3 commits.
# The first commit's message is:
Add seperate zwave panel

# The 2nd commit message will be skipped:

#	unused import

# The 3rd commit message will be skipped:

#	Use get for config

* Add seperate zwave panel

* Modify set_config_parameter to accept setting string values

* descriptions

* Tweaks

* Tweaks

* Tweaks

* Tweaks

* lint

* Fallback if no config parameteres are available

* Update services.yaml

* review changes
2017-05-18 17:39:31 -07:00
Adam Mills cfea4b17e3 Add tests for zwave network events (#7573) 2017-05-12 23:06:32 -07:00
Adam Mills 189023821b Tests for zwave setup features (#7570)
* Tests for zwave setup features

* Add test for frontend panel register
2017-05-12 20:27:44 -07:00