Skip to content
Snippets Groups Projects
Commit 3226793b authored by jkerdreu's avatar jkerdreu
Browse files

Added a group, to unsure home assistant pack them in a single device


git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2967 b32b6428-25c9-4566-ad07-03861ab6144f
parent f7eaf6c3
Branches
No related tags found
No related merge requests found
......@@ -54,11 +54,15 @@ class GW:
rate = float(cfg['refresh'])
self.engine.add_timer(self.process,rate)
grp_uuid = tools.get_random_uuid()
dev = build_dev(tools.get_uuid(cfg['thermometer']) ,"thermometer.basic")
dev.group_id = grp_uuid
self.temp = dev.new_attribute("temperature")
self.engine.add_device(dev)
dev = build_dev(tools.get_uuid(cfg['hygrometer']),"hygrometer.basic")
dev.group_id = grp_uuid
self.hum = dev.new_attribute("humidity")
self.engine.add_device(dev)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment