Browse Source

another bug-fix...

tags/v1.0.0
Dirk Alders 2 years ago
parent
commit
931f1c9809
2 changed files with 4 additions and 3 deletions
  1. 1
    0
      function/__init__.py
  2. 3
    3
      function/ground_floor_west.py

+ 1
- 0
function/__init__.py View File

15
     ROOT_LOGGER_NAME = 'root'
15
     ROOT_LOGGER_NAME = 'root'
16
 logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
16
 logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
17
 
17
 
18
+# TODO: usage of implementation strategy from gfw_dirk for ffe_sleep_madi
18
 # TODO: implement garland (incl. day events like sunset, sunrise, ...)
19
 # TODO: implement garland (incl. day events like sunset, sunrise, ...)
19
 # TODO: implement warning message
20
 # TODO: implement warning message
20
 
21
 

+ 3
- 3
function/ground_floor_west.py View File

178
         if device == self.button_tradfri:
178
         if device == self.button_tradfri:
179
             logger.info("Toggeling \"%s\" desk light to %s", type(self).__name__,
179
             logger.info("Toggeling \"%s\" desk light to %s", type(self).__name__,
180
                         not self.powerplug_common.get(self.KEY_POWERPLUG_DESK_LIGHT))
180
                         not self.powerplug_common.get(self.KEY_POWERPLUG_DESK_LIGHT))
181
-            self.powerplug_common.set_output(self.KEY_POWERPLUG_AMPLIFIER, "toggle")
181
+            self.powerplug_common.set_output(self.KEY_POWERPLUG_DESK_LIGHT, "toggle")
182
         else:
182
         else:
183
             logger.info("Setting \"%s\" desk light: %s", type(self).__name__, data)
183
             logger.info("Setting \"%s\" desk light: %s", type(self).__name__, data)
184
             self.powerplug_common.set_output(self.KEY_POWERPLUG_DESK_LIGHT, data)
184
             self.powerplug_common.set_output(self.KEY_POWERPLUG_DESK_LIGHT, data)
252
         elif state == self.STATE_ACTIVE_DEVICE_AMPLIFIER:
252
         elif state == self.STATE_ACTIVE_DEVICE_AMPLIFIER:
253
             return self.powerplug_common.get(self.KEY_POWERPLUG_AMPLIFIER)
253
             return self.powerplug_common.get(self.KEY_POWERPLUG_AMPLIFIER)
254
 
254
 
255
-    def choose_next_device(self, device=None, key=None, data=None):
255
+    def choose_prev_device(self, device=None, key=None, data=None):
256
         if self.active_device_state is not None:
256
         if self.active_device_state is not None:
257
             start_value = self.active_device_state
257
             start_value = self.active_device_state
258
             for i in range(0, self.STATE_ACTIVE_DEVICE_MAX_VALUE + 1):
258
             for i in range(0, self.STATE_ACTIVE_DEVICE_MAX_VALUE + 1):
264
                     return
264
                     return
265
         self.active_device_state = None
265
         self.active_device_state = None
266
 
266
 
267
-    def choose_prev_device(self, device=None, key=None, data=None):
267
+    def choose_next_device(self, device=None, key=None, data=None):
268
         if self.active_device_state is not None:
268
         if self.active_device_state is not None:
269
             start_value = self.active_device_state
269
             start_value = self.active_device_state
270
             for i in range(0, self.STATE_ACTIVE_DEVICE_MAX_VALUE + 1):
270
             for i in range(0, self.STATE_ACTIVE_DEVICE_MAX_VALUE + 1):

Loading…
Cancel
Save