Value documentation¶
The value.
- 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.value.
ZWaveValue
(value_id, network=None, parent=None)¶ Represents a single value.
-
check_data
(data)¶ Check that data is correct for this value. Return the data in a correct type. None is data is incorrect.
Parameters: data (lambda) – The data value to check Returns: A variable of the good type if the data is correct. None otherwise. Return type: variable
-
command_class
¶ The command class of the value.
Returns: The command class of this value Return type: int
-
data
¶ Get the current data of the value.
Returns: The data of the value Return type: depending of the type of the value
-
data_as_string
¶ Get the value data as String.
Return type: str
-
data_items
¶ When type of value is list, data_items contains a list of valid values
Returns: The valid values or a help string Return type: string or set
-
disable_poll
()¶ Disable poll off this value.
Returns: True if polling was disabled. Return type: bool
-
enable_poll
(intensity=1)¶ Enable the polling of a device’s state.
Parameters: intensity (int) – The intensity of the poll Returns: True if polling was enabled. Return type: bool
-
genre
¶ Get the genre of the value. The genre classifies a value to enable low-level system or configuration parameters to be filtered out by the application
Returns: genre of the value (Basic, User, Config, System) Return type: str
-
help
¶ Gets a help string describing the value’s purpose and usage.
Return type: str
-
id_on_network
¶ Get an unique id for this value.
The scenes use this to retrieve values
<Scene id="1" label="scene1"> <Value homeId="0x014d0ef5" nodeId="2" genre="user" commandClassId="38" instance="1" index="0" type="byte">54</Value> </Scene>
The format is :
home_id.node_id.command_class.instance.index
-
index
¶ Get the value index. The index is used to identify one of multiple values created and managed by a command class. In the case of configurable parameters (handled by the configuration command class), the index is the same as the parameter ID.
Returns: index of the value Return type: int
-
instance
¶ Get the command class instance of this value. It is possible for there to be multiple instances of a command class, although currently it appears that only the SensorMultilevel command class ever does this.
Returns: instance of the value Return type: int
-
is_change_verified
()¶ determine if value changes upon a refresh should be verified. If so, the library will immediately refresh the value a second time whenever a change is observed. This helps to filter out spurious data reported occasionally by some devices.
-
is_polled
¶ Verify that the value is polled.
Return type: bool
-
is_read_only
¶ Test whether the value is read-only.
Returns: True if the value cannot be changed by the user. Return type: bool
-
is_set
¶ Test whether the value has been set.
Returns: True if the value has actually been set by a status message from the device, rather than simply being the default. Return type: bool
-
is_write_only
¶ Test whether the value is write-only.
Returns: True if the value can only be written to and not read. Return type: bool
-
label
¶ Get the label of the value.
Return type: str
-
max
¶ Gets the maximum that this value may contain.
Return type: int
-
min
¶ Gets the minimum that this value may contain.
Return type: int
-
node
¶ The value_id of the value.
-
parent_id
¶ Get the parent_id of the value.
-
poll_intensity
¶ The poll intensity of the value.
Returns: 0=none, 1=every time through the list, 2-every other time, etc Return type: int
-
precision
¶ Gets a float value’s precision.
Returns: a float value’s precision Return type: int
-
refresh
()¶ Refresh the value.
Returns: True if the command was transmitted to controller Return type: bool
-
set_change_verified
(verify)¶ Sets a flag indicating whether value changes noted upon a refresh should be verified.
If so, the library will immediately refresh the value a second time whenever a change is observed. This helps to filter out spurious data reported occasionally by some devices.
Parameters: verify (bool) – if true, verify changes; if false, don’t verify changes.
-
to_dict
(extras=['all'])¶ Return a dict representation of the node.
Parameters: extras ([]) – The extra inforamtions to add Returns: A dict Return type: dict()
-
type
¶ Get the type of the value. The type describes the data held by the value and enables the user to select the correct value accessor method in the Manager class.
Returns: type of the value Return type: str
-
units
¶ Gets the units that the value is measured in.
Return type: str
-
value_id
¶ Get the value_id of the value.
-