Skip to content
Snippets Groups Projects
Commit 9e5a72ff authored by jkerdreu's avatar jkerdreu
Browse files

- Fix wrong state for most device !!

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2988 b32b6428-25c9-4566-ad07-03861ab6144f
parent ae90cfc1
Branches
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ class XAALBinarySensorEntity(XAALEntity, BinarySensorEntity):
def state(self):
try:
attr = getattr(self,'_xaal_attribute')
value = self._dev.attributes.get('presence', None)
value = self._dev.attributes.get(attr, None)
return STATE_ON if value else STATE_OFF
except:
return None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment