Scene documentation¶
The scenes.
- This file is part of python-openzwave project https://github.com/OpenZWave/python-openzwave.
platform: Unix, Windows, MacOS X sinopsis: openzwave API
License : GPL(v3)
python-openzwave is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
python-openzwave is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with python-openzwave. If not, see http://www.gnu.org/licenses.
-
class
openzwave.scene.
ZWaveScene
(scene_id, network)¶ Represents a single scene within the Z-Wave Network
-
activate
()¶ Activate the zwave scene.
Returns: True if the scene is activated. False otherwise. Return type: bool
-
add_value
(value_id, value_data)¶ Add a value with data value_data to the zwave scene.
Parameters: - value_id (int) – The id of the value to add
- value_data (variable) – The data of the value to add
-
create
(label=None)¶ Create a new zwave scene on the network and update the object_id field If label is set, also change the label of the scene
Parameters: label (str or None) – The new label Returns: return the id of scene on the network. Return 0 if fails Return type: int
-
get_values
()¶ Get all the values of the scene
Returns: A dict of values : {value_id={‘value’=ZWaveValue, ‘data’=data}, …}. Return type: dict()
-
get_values_by_node
()¶ Get all the values of the scene grouped by nodes
Returns: A dict of values : {node_id={value_id={‘value’=ZWaveValue, ‘data’=data}, …},…}. Return type: dict()
-
label
¶ The label of the scene.
Return type: str
-
remove_value
(value_id)¶ Remove a value from the scene.
Parameters: value_id (int) – The id of the value to change Returns: True if the scene is removed. False otherwise. Return type: bool
-
scene_id
¶ The id of the scene.
Return type: int
-
set_value
(value_id, value_data)¶ Set a value data to value_data in the zwave scene.
Parameters: - value_id (int) – The id of the value to add
- value_data (variable) – The data of the value to add
-
to_dict
(extras=['kvals'])¶ Return a dict representation of the node.
Parameters: extras ([]) – The extra inforamtions to add Returns: A dict Return type: dict()
-