Un commont lines
This commit is contained in:
@@ -42,11 +42,11 @@ class PooRecorder:
|
||||
|
||||
async def record(self, record_detail: RecordField) -> None:
|
||||
webhook_id: str = Config.get_env("HOMEASSISTANT_POO_TRIGGER_ID")
|
||||
# self._publish_text(record_detail.status)
|
||||
self._publish_text(record_detail.status)
|
||||
now = datetime.now(tz=datetime.now().astimezone().tzinfo)
|
||||
# self._publish_time(now)
|
||||
self._publish_time(now)
|
||||
await self._note(now, record_detail.status, record_detail.latitude, record_detail.longitude)
|
||||
# await self._homeassistant.trigger_webhook(payload={"status": record_detail.status}, webhook_id=webhook_id)
|
||||
await self._homeassistant.trigger_webhook(payload={"status": record_detail.status}, webhook_id=webhook_id)
|
||||
|
||||
def _publish_text(self, new_text: str) -> None:
|
||||
self._mqtt.publish(PooRecorder.AVAILABILITY_TOPIC, PooRecorder.ONLINE, retain=True)
|
||||
|
||||
Reference in New Issue
Block a user