Hello,
I'm reading data from some wireless temperature sensors (Oregon THGR810s via RFXCom) and along with the readings they give a simple (one bit) battery flag which essentially just shows when the battery is 'Low'.
So, if my code sees this flag, I set the battery level to 10 which then displays a little red low battery using the standard sensor widget:
Program.RaiseEvent(module, "Status.Battery", "10", "Low Battery");
That's great - but the problem is this...
If the battery is replaced, one option is to simply update this to 100% (and I could update the widget to hide this) however this isn't really ideal as all I know form the data is if the battery is low or not (so 100% may be misleading). Ideally I'd like to 'clear' the property altogether so the widget just doesn't see it anymore.
I've tried setting the value to null but that didn't work.
Just wondered if I'd missed something?
My next option is to add a 'LowBattery' 0/1 property, and update the widget to show this. This is fine and I'm happy to go that way, but I thought I'd check the if removal of a property was possible first.
Thanks for your help!
T