I could use a little help understanding how bindings work.
I'm extending etc6849's Vizia driver to support sensors. I've run into a behavior that I don't understand, and would appreciate some guidance.
I've created a Sensor base class that inherits from DigitalInput. The intention is to inherit from the Sensor class in order to create a number of other classes:
- BinarySensor (used for handling devices that provide a binary on/off state, such as the Everspring SM103 door/window sensor or the ACT ZIR000 motion sensor)
- AlarmSensor (used for handling devices that provide an alarm condition, in addition to the binary on/off state, such as HM-FS001 flood sensor)
- MultilevelSensor (used for handling sensors that report multiple readings, such as the HSM100, which reports motion, temperature, and luminance)
I'm running into a problem with my MultilevelSensor class. MultilevelSensor inherits from Sensor (so it picks up State from DigitalInput), TemperatureSensor, HumiditySensor, and LightSensor). Within the driver module, I can set all the properties that the zwave sensor reports -- in this case the HSM100 reports motion, temp, and luminance. This part is working very well.
The problem arises when I try to bind a MultilevelSensor object to a Home object. In testing this, when I create TemperatureSensor, LightSensor, and MotionSensor objects under Home, I run into a problem when I bind these to a MultilevelSensor device object. TemperatureSensor gets bound to the device's State and Temperature properties, while LightSensor gets bound to the device's State and Light properties. This causes the Home objects' Temperature and Light properties to be corrupted when State changes.
Here's a picture of what I mean. I've highlighted the areas of interest. The binding of Temperature to State doesn't seem right. And, I can't figure out how to delete the Temperature-State binding. You also can see how the Temperature reading got mangled when the State property changed.

Thanks for any help.
I'm extending etc6849's Vizia driver to support sensors. I've run into a behavior that I don't understand, and would appreciate some guidance.
I've created a Sensor base class that inherits from DigitalInput. The intention is to inherit from the Sensor class in order to create a number of other classes:
- BinarySensor (used for handling devices that provide a binary on/off state, such as the Everspring SM103 door/window sensor or the ACT ZIR000 motion sensor)
- AlarmSensor (used for handling devices that provide an alarm condition, in addition to the binary on/off state, such as HM-FS001 flood sensor)
- MultilevelSensor (used for handling sensors that report multiple readings, such as the HSM100, which reports motion, temperature, and luminance)
I'm running into a problem with my MultilevelSensor class. MultilevelSensor inherits from Sensor (so it picks up State from DigitalInput), TemperatureSensor, HumiditySensor, and LightSensor). Within the driver module, I can set all the properties that the zwave sensor reports -- in this case the HSM100 reports motion, temp, and luminance. This part is working very well.
The problem arises when I try to bind a MultilevelSensor object to a Home object. In testing this, when I create TemperatureSensor, LightSensor, and MotionSensor objects under Home, I run into a problem when I bind these to a MultilevelSensor device object. TemperatureSensor gets bound to the device's State and Temperature properties, while LightSensor gets bound to the device's State and Light properties. This causes the Home objects' Temperature and Light properties to be corrupted when State changes.
Here's a picture of what I mean. I've highlighted the areas of interest. The binding of Temperature to State doesn't seem right. And, I can't figure out how to delete the Temperature-State binding. You also can see how the Temperature reading got mangled when the State property changed.

Thanks for any help.