refactored 4
This commit is contained in:
@@ -328,7 +328,8 @@ async def mqtt_worker(config: dict[str, Any], redis_client: aioredis.Redis) -> N
|
|||||||
last_activity = asyncio.get_event_loop().time()
|
last_activity = asyncio.get_event_loop().time()
|
||||||
topic = str(message.topic)
|
topic = str(message.topic)
|
||||||
payload_str = message.payload.decode()
|
payload_str = message.payload.decode()
|
||||||
logger.debug(f"MQTT message received on {topic}: {payload_str}")
|
retain = getattr(message, 'retain', None)
|
||||||
|
logger.debug(f"MQTT message received on ({retain=}) {topic}: {payload_str}")
|
||||||
|
|
||||||
# Check if this is an abstract SET message
|
# Check if this is an abstract SET message
|
||||||
if topic.startswith("home/") and topic.endswith("/set"):
|
if topic.startswith("home/") and topic.endswith("/set"):
|
||||||
|
|||||||
Reference in New Issue
Block a user