Value documentation

The value.

This file is part of python-openzwave project http://code.google.com/p/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.

Returns:A variable of the good type if the data is correct. None otherwise.
Return type:variable
command_class

The commandclass of the value.

Returns:The command class of this value
Return type:int
data

The current data of the value.

Returns:The data of the value
Return type:depending of the type of the value
data_as_string

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

The help of the value.

Return type:str
id_on_network

Return 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.commnand_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_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. :rtype: 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

The label of the value.

Return type:str
max

The max of the value.

Return type:int
min

The min of the value.

Return type:int
node

The value_id of the value.

parent_id

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
refresh()

Refresh the value.

Returns:True if the command was transmitted to controller
Return type:bool
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

The units of the value.

Return type:str
value_id

The value_id of the value.