Преглед изворни кода

devdi: My Ambient info added

master
Dirk Alders пре 4 месеци
родитељ
комит
0f5ad2a18a
2 измењених фајлова са 9 додато и 1 уклоњено
  1. 3
    0
      devices.py
  2. 6
    1
      topic.py

+ 3
- 0
devices.py Прегледај датотеку

@@ -32,6 +32,7 @@ class base(dict):
32 32
             props.DTY_MPP_4xx: devices.my_powerplug,
33 33
             props.DTY_MAS_xxx: devices.audio_status,
34 34
             props.DTY_MRE_xxx: devices.remote,
35
+            props.DTY_MAM_THP: devices.my_ambient,
35 36
         }.get(dty)
36 37
 
37 38
     def add(self, mqtt_client, stg, loc, roo, fun, dty, num=None):
@@ -133,6 +134,7 @@ class physical_devices(base):
133 134
         self.add(mqtt_client, props.STG_MYA, loc, roo, props.FUN_ASM, props.DTY_MAS_xxx)            # Audio status MPD
134 135
         self.add(mqtt_client, props.STG_MYA, loc, roo, props.FUN_ASB, props.DTY_MAS_xxx)            # Audio status Bluetooth
135 136
         self.add(mqtt_client, props.STG_ZGW, loc, roo, props.FUN_HEA, props.DTY_BVL_xxx)            # Brennenstuhl Heatingvalve
137
+        self.add(mqtt_client, props.STG_MYA, loc, roo, props.FUN_AMB, props.DTY_MAM_THP)            # My Ambient information
136 138
 
137 139
         # GARDEN
138 140
         self.add(mqtt_client, props.STG_ZGW, props.LOC_GAR, props.ROO_GAR, props.FUN_GAR, props.DTY_SPP_SW1)
@@ -186,6 +188,7 @@ class physical_devices(base):
186 188
         self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_FLL, props.DTY_SPP_SW1)            # Powerplug Floor Light
187 189
         self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_GAR, props.DTY_SPP_SW1)            # Powerplug Garland
188 190
         self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_HEA, props.DTY_BVL_xxx)            # Brennenstuhl Heatingvalve
191
+        self.add(mqtt_client, props.STG_MYA, loc, roo, props.FUN_AMB, props.DTY_MAM_THP)            # My Ambient information
189 192
 
190 193
         # SLEEP
191 194
         roo = props.ROO_SLP

+ 6
- 1
topic.py Прегледај датотеку

@@ -27,7 +27,8 @@ DTY_MAS_xxx = 11
27 27
 """ My Audio status (MPD) """
28 28
 DTY_MRE_xxx = 12
29 29
 """ My Remote control """
30
-
30
+DTY_MAM_THP = 13
31
+""" My Ambient Information (Temperature, Humidity, Pressure)"""
31 32
 
32 33
 #
33 34
 # Source Transmission Group
@@ -132,6 +133,9 @@ FUN_ASB = 18
132 133
 """ Audio status bluetooth """
133 134
 FUN_DCK = 19
134 135
 """ Docking Station """
136
+FUN_AMB = 20
137
+""" Ambient information """
138
+
135 139
 
136 140
 class topic_by_props(UserString):
137 141
     def __init__(self, stg, loc, roo, fun):
@@ -194,4 +198,5 @@ class topic_by_props(UserString):
194 198
             FUN_ASS: 'audio_status_spotify',
195 199
             FUN_ASM: 'audio_status_mpd',
196 200
             FUN_ASB: 'audio_status_bt',
201
+            FUN_AMB: 'ambient',
197 202
         }.get(fun)

Loading…
Откажи
Сачувај