From d4e6731d6e1998d61dc391a5ce6e18d548e68a44 Mon Sep 17 00:00:00 2001 From: Mike Stegeman Date: Mon, 5 Feb 2018 18:25:07 +0000 Subject: [PATCH] Add fire_and_forget member to Property. (#3) --- gateway_addon/addon_manager_proxy.py | 2 ++ gateway_addon/property.py | 1 + 2 files changed, 3 insertions(+) diff --git a/gateway_addon/addon_manager_proxy.py b/gateway_addon/addon_manager_proxy.py index 8dbcd03..90b8ca2 100644 --- a/gateway_addon/addon_manager_proxy.py +++ b/gateway_addon/addon_manager_proxy.py @@ -199,6 +199,8 @@ def set_prop_fn(proxy): prop = dev.find_property(msg['data']['propertyName']) if prop: prop.set_value(msg['data']['propertyValue']) + if prop.fire_and_forget: + self.send_property_changed_notification(prop) self.make_thread(set_prop_fn, args=(self,)) continue diff --git a/gateway_addon/property.py b/gateway_addon/property.py index 7e06b1e..76d83ba 100644 --- a/gateway_addon/property.py +++ b/gateway_addon/property.py @@ -17,6 +17,7 @@ def __init__(self, device, name, description): self.value = None self.description = {} self.visible = True + self.fire_and_forget = False if 'visible' in description: self.visible = description['visible']