fix typos

This commit is contained in:
avollkopf 2022-04-02 16:27:09 +02:00
parent 14f1bd6dd4
commit 72ea595f16
6 changed files with 8 additions and 8 deletions

View file

@ -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)

View file

@ -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

View file

@ -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))

View file

@ -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")

View file

@ -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

View file

@ -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")