diff --git a/app/daemon.py b/app/daemon.py
index 8d3715b..3ec207a 100644
--- a/app/daemon.py
+++ b/app/daemon.py
@@ -7,6 +7,7 @@ siguiente evento, asi que un fichaje no se desvia mas de unas decimas.
from __future__ import annotations
import asyncio
+import html
import logging
import random
import signal
@@ -137,6 +138,13 @@ class Service:
await self.notify(f"⚠️ Google Calendar falló ({e}). Se sigue con el plan.")
return None
+ async def _avisar_dia_libre(self, day: date, motivo: str) -> None:
+ """Avisa una sola vez por dia de que hoy no se ficha (aunque se reinicie)."""
+ if self.store.get("aviso_dia_libre") == day.isoformat():
+ return
+ self.store.put("aviso_dia_libre", day.isoformat())
+ await self.notify(f"🌴 Hoy no se ficha: {html.escape(motivo)}")
+
# --------------------------------------------------------------------- plan
def _plan_al_dia(self, day: date, cal) -> bool:
"""El plan guardado sigue cuadrando con el calendario de Timenet."""
@@ -157,6 +165,8 @@ class Service:
ov = self.store.get_override(day)
if ov and ov["action"] == "off":
+ if day == self.today():
+ await self._avisar_dia_libre(day, ov["reason"] or "día desactivado")
return []
if not cal.is_workday(day):
@@ -172,7 +182,7 @@ class Service:
if ausencia:
self.store.set_override(day, "off", f"Google Calendar: {ausencia}")
if day == self.today():
- await self.notify(f"🌴 Hoy no se ficha: {ausencia} (Google Calendar)")
+ await self._avisar_dia_libre(day, f"Google Calendar: {ausencia}")
return []
plan = self.planner.plan_day(cal, day, random.Random())