mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-22 15:08:12 +01:00
Extend exception messages for warning logs
This commit is contained in:
parent
f337cb8e97
commit
7413f79d6e
1 changed files with 6 additions and 6 deletions
|
@ -33,24 +33,24 @@ class SatelliteController:
|
||||||
if self.client is not None and self.client._connected:
|
if self.client is not None and self.client._connected:
|
||||||
try:
|
try:
|
||||||
await self.client.publish(topic, message, qos=1, retain=retain)
|
await self.client.publish(topic, message, qos=1, retain=retain)
|
||||||
except:
|
except Exception as e:
|
||||||
self.logger.warning("Failed to push data via mqtt")
|
self.logger.warning("Failed to push data via mqtt: {}".format(e))
|
||||||
|
|
||||||
async def _actor_on(self, messages):
|
async def _actor_on(self, messages):
|
||||||
async for message in messages:
|
async for message in messages:
|
||||||
try:
|
try:
|
||||||
topic_key = message.topic.split("/")
|
topic_key = message.topic.split("/")
|
||||||
await self.cbpi.actor.on(topic_key[2])
|
await self.cbpi.actor.on(topic_key[2])
|
||||||
except:
|
except Exception as e:
|
||||||
self.logger.warning("Failed to process actor on via mqtt")
|
self.logger.warning("Failed to process actor on via mqtt: {}".format(e))
|
||||||
|
|
||||||
async def _actor_off(self, messages):
|
async def _actor_off(self, messages):
|
||||||
async for message in messages:
|
async for message in messages:
|
||||||
try:
|
try:
|
||||||
topic_key = message.topic.split("/")
|
topic_key = message.topic.split("/")
|
||||||
await self.cbpi.actor.off(topic_key[2])
|
await self.cbpi.actor.off(topic_key[2])
|
||||||
except:
|
except Exception as e:
|
||||||
self.logger.warning("Failed to process actor off via mqtt")
|
self.logger.warning("Failed to process actor off via mqtt: {}".format(e))
|
||||||
|
|
||||||
async def _actor_power(self, messages):
|
async def _actor_power(self, messages):
|
||||||
async for message in messages:
|
async for message in messages:
|
||||||
|
|
Loading…
Reference in a new issue