From 72ea595f1617c43070b9781d6fa2836564a0aaba Mon Sep 17 00:00:00 2001 From: avollkopf <43980694+avollkopf@users.noreply.github.com> Date: Sat, 2 Apr 2022 16:27:09 +0200 Subject: [PATCH] fix typos --- cbpi/api/extension.py | 2 +- cbpi/api/sensor.py | 2 +- cbpi/controller/basic_controller2.py | 2 +- cbpi/controller/notification_controller.py | 4 ++-- cbpi/controller/sensor_controller.py | 4 ++-- cbpi/controller/step_controller.py | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cbpi/api/extension.py b/cbpi/api/extension.py index b3a0148..0c2c61a 100644 --- a/cbpi/api/extension.py +++ b/cbpi/api/extension.py @@ -48,7 +48,7 @@ class CBPiExtension(): return data except: - logger.warning("Faild to load config %s/config.yaml" % path) + logger.warning("Failed to load config %s/config.yaml" % path) diff --git a/cbpi/api/sensor.py b/cbpi/api/sensor.py index 4ed9777..a539aca 100644 --- a/cbpi/api/sensor.py +++ b/cbpi/api/sensor.py @@ -39,7 +39,7 @@ class CBPiSensor(CBPiBase, metaclass=ABCMeta): self.cbpi.push_update("cbpi/sensordata/{}".format(self.id), dict(id=self.id, value=value), retain=True) # self.cbpi.push_update("cbpi/sensor/{}/udpate".format(self.id), dict(id=self.id, value=value), retain=True) except: - logging.error("Faild to push sensor update") + logging.error("Failed to push sensor update") async def start(self): pass diff --git a/cbpi/controller/basic_controller2.py b/cbpi/controller/basic_controller2.py index c3207dc..32acd83 100644 --- a/cbpi/controller/basic_controller2.py +++ b/cbpi/controller/basic_controller2.py @@ -151,4 +151,4 @@ class BasicController: item = self.find_by_id(id) await item.instance.__getattribute__(action)(**parameter) except Exception as e: - logging.error("{} Faild to call action on {} {} {}".format(self.name, id, action, e)) + logging.error("{} Failed to call action on {} {} {}".format(self.name, id, action, e)) diff --git a/cbpi/controller/notification_controller.py b/cbpi/controller/notification_controller.py index 0e9fbfe..5d2b4ef 100644 --- a/cbpi/controller/notification_controller.py +++ b/cbpi/controller/notification_controller.py @@ -22,7 +22,7 @@ class NotificationController: try: del self.listener[listener_id] except: - self.logger.error("Faild to remove listener {}".format(listener_id)) + self.logger.error("Failed to remove listener {}".format(listener_id)) async def _call_listener(self, title, message, type, action): for id, method in self.listener.items(): @@ -60,5 +60,5 @@ class NotificationController: asyncio.create_task(action.method()) del self.callback_cache[notification_id] except Exception as e: - self.logger.error("Faild to call notificatoin callback") + self.logger.error("Failed to call notificatoin callback") \ No newline at end of file diff --git a/cbpi/controller/sensor_controller.py b/cbpi/controller/sensor_controller.py index fad7152..44f0ce0 100644 --- a/cbpi/controller/sensor_controller.py +++ b/cbpi/controller/sensor_controller.py @@ -12,7 +12,7 @@ class SensorController(BasicController): instance = data.get("instance") state =instance.get_state() except Exception as e: - logging.error("Faild to create sensor dict {} ".format(e)) + logging.error("Failed to create sensor dict {} ".format(e)) state = dict() return dict(name=data.get("name"), id=data.get("id"), type=data.get("type"), state=state,props=data.get("props", [])) @@ -21,5 +21,5 @@ class SensorController(BasicController): try: return self.find_by_id(id).instance.get_state() except Exception as e: - logging.error("Faild read sensor value {} {} ".format(id, e)) + logging.error("Failed read sensor value {} {} ".format(id, e)) return None \ No newline at end of file diff --git a/cbpi/controller/step_controller.py b/cbpi/controller/step_controller.py index 92c3b1e..8850fd9 100644 --- a/cbpi/controller/step_controller.py +++ b/cbpi/controller/step_controller.py @@ -279,7 +279,7 @@ class StepController: await step.instance.start() step.status = StepState.ACTIVE except Exception as e: - logging.error("Faild to start step %s" % step) + logging.error("Failed to start step %s" % step) async def save_basic(self, data): logging.info("SAVE Basic Data")