public class ZwaveThermostatMode extends java.lang.Object implements ThermostatMode, SendDataListener
RequestFrameListener.RequestFrameError
AUTO, AUTO_CHANGEOVER, AUXILIARY, AWAY, COOL, DRY, ENERGY_COOL, ENERGY_HEAT, FAN, FULL_POWER, FURNACE, HEAT, MOIST, OFF, RESUME
Constructor and Description |
---|
ZwaveThermostatMode(ZwaveThermostat thermostat,
int type,
byte modeId)
A thermostat mode on the Zwave protocol.
|
Modifier and Type | Method and Description |
---|---|
void |
callbackComplete(byte[] bytes,
int commandClassIndex) |
boolean |
equals(java.lang.Object obj) |
double |
getLastKnownValue()
Gets the last known value.
|
byte |
getModeId()
Gets the modeId.
|
ZwaveNode |
getNode() |
int |
getType()
Gets the name of the mode.
|
int |
hashCode() |
void |
notifyComplete() |
void |
notifyError(RequestFrameListener.RequestFrameError error) |
void |
requestUpdate()
Requests the update of the value.
|
void |
setValue(double value)
Sets the value.
|
java.lang.String |
toString() |
void |
updateValue(double value)
Update the value and send notification.
|
public ZwaveThermostatMode(ZwaveThermostat thermostat, int type, byte modeId)
thermostat
- The node.type
- The type of mode.modeId
- The Zwave modeId.public void setValue(double value) throws java.io.IOException
ThermostatMode
setValue
in interface ThermostatMode
value
- the value.java.io.IOException
- if there is a communication error with the device.public void updateValue(double value)
value
- public double getLastKnownValue()
ThermostatMode
getLastKnownValue
in interface ThermostatMode
MultilevelValue.UNKNOWN
if unknown.public void requestUpdate() throws java.io.IOException
ThermostatMode
requestUpdate
in interface ThermostatMode
java.io.IOException
- if there is a communication error with the devicepublic int getType()
ThermostatMode
getType
in interface ThermostatMode
public byte getModeId()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void notifyComplete()
notifyComplete
in interface RequestFrameListener
public void notifyError(RequestFrameListener.RequestFrameError error)
notifyError
in interface RequestFrameListener
public ZwaveNode getNode()
getNode
in interface SendDataListener
public void callbackComplete(byte[] bytes, int commandClassIndex)
callbackComplete
in interface SendDataListener
public java.lang.String toString()
toString
in class java.lang.Object