Browse Source

devdi: My Ambient info added

master
Dirk Alders 4 months ago
parent
commit
0f5ad2a18a
2 changed files with 9 additions and 1 deletions
  1. 3
    0
      devices.py
  2. 6
    1
      topic.py

+ 3
- 0
devices.py View File

32
             props.DTY_MPP_4xx: devices.my_powerplug,
32
             props.DTY_MPP_4xx: devices.my_powerplug,
33
             props.DTY_MAS_xxx: devices.audio_status,
33
             props.DTY_MAS_xxx: devices.audio_status,
34
             props.DTY_MRE_xxx: devices.remote,
34
             props.DTY_MRE_xxx: devices.remote,
35
+            props.DTY_MAM_THP: devices.my_ambient,
35
         }.get(dty)
36
         }.get(dty)
36
 
37
 
37
     def add(self, mqtt_client, stg, loc, roo, fun, dty, num=None):
38
     def add(self, mqtt_client, stg, loc, roo, fun, dty, num=None):
133
         self.add(mqtt_client, props.STG_MYA, loc, roo, props.FUN_ASM, props.DTY_MAS_xxx)            # Audio status MPD
134
         self.add(mqtt_client, props.STG_MYA, loc, roo, props.FUN_ASM, props.DTY_MAS_xxx)            # Audio status MPD
134
         self.add(mqtt_client, props.STG_MYA, loc, roo, props.FUN_ASB, props.DTY_MAS_xxx)            # Audio status Bluetooth
135
         self.add(mqtt_client, props.STG_MYA, loc, roo, props.FUN_ASB, props.DTY_MAS_xxx)            # Audio status Bluetooth
135
         self.add(mqtt_client, props.STG_ZGW, loc, roo, props.FUN_HEA, props.DTY_BVL_xxx)            # Brennenstuhl Heatingvalve
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
         # GARDEN
139
         # GARDEN
138
         self.add(mqtt_client, props.STG_ZGW, props.LOC_GAR, props.ROO_GAR, props.FUN_GAR, props.DTY_SPP_SW1)
140
         self.add(mqtt_client, props.STG_ZGW, props.LOC_GAR, props.ROO_GAR, props.FUN_GAR, props.DTY_SPP_SW1)
186
         self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_FLL, props.DTY_SPP_SW1)            # Powerplug Floor Light
188
         self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_FLL, props.DTY_SPP_SW1)            # Powerplug Floor Light
187
         self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_GAR, props.DTY_SPP_SW1)            # Powerplug Garland
189
         self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_GAR, props.DTY_SPP_SW1)            # Powerplug Garland
188
         self.add(mqtt_client, props.STG_ZFE, loc, roo, props.FUN_HEA, props.DTY_BVL_xxx)            # Brennenstuhl Heatingvalve
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
         # SLEEP
193
         # SLEEP
191
         roo = props.ROO_SLP
194
         roo = props.ROO_SLP

+ 6
- 1
topic.py View File

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

Loading…
Cancel
Save