forked from stas-demydiuk/domoticz-zigbee2mqtt-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbridge.py
More file actions
29 lines (24 loc) · 712 Bytes
/
bridge.py
File metadata and controls
29 lines (24 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import domoticz
bridge_health = {}
bridge_info = {}
zigbee_devices = []
zigbee_groups = []
def handle_mqtt_message(topic, message):
if topic == 'bridge/devices':
domoticz.log('Received available devices list from bridge')
global zigbee_devices
zigbee_devices = message
return
if topic == 'bridge/groups':
domoticz.log('Received available devices groups from bridge')
global zigbee_groups
zigbee_groups = message
return
if topic == 'bridge/health':
global bridge_health
bridge_health = message
return
if topic == 'bridge/info':
global bridge_info
bridge_info = message
return