YAML automation 'attic.fan.thermal.control' and pyscript
attic_fan_manager.py were both firing on the same temperature
triggers, sending two notifications per event. Pyscript version
is more complete (fail-safe handling of None sensor values,
periodic watchdog every 5min, startup trigger) - YAML was
redundant. Drop YAML.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Routine_turn_on had two triggers (sunset and 20:30) but both were
gated by is_dark() which requires sun.sun == below_horizon. In summer
sunset in Prague is ~21:10, so the 20:30 trigger fired uselessly while
sun still above horizon, and the scene only activated at actual sunset.
Drop is_dark() from routine_turn_on - both triggers should activate
the scene unconditionally (sunset = already dark; 20:30 = user wants
lights on by then regardless of remaining daylight).
Arrival_handler and motion_shutdown keep is_dark() since context there
is different (don't snap lights on/off based on presence at noon).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Prompt fixes after Gemini was flagging empty terraces as having
cushions (count=4 on bare metal rattan chairs):
- Correct scene description: camera on left wall of house, terrace
visible on right side (was incorrectly described as bird's-eye view)
- Explicit anti-hallucination guidance: don't assume textiles are
there by default, empty terraces are common
- Add "DEFINITIVELY NOT TEXTILES" list (built-in rattan seats/backs,
metal frames, shadows) - prior prompt only mentioned them indirectly
- Lead examples with "empty terrace" case so AI uses it as anchor
- Tiebreaker rule: when uncertain, default to has_loose_cushions=false
Quiet hours: no notify between 22:00-07:00 to avoid waking up. Snapshot
and AI evaluation still run and log, just no push/telegram during the
window.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
New pyscript automation that snaps reolink_5_main when rain is incoming,
asks Gemini (ai_task.google_ai_task) whether loose cushions/cushions
are still on the terrace sofa, and alerts on mobile_app_is17 + Telegram
sendPhoto when has_loose_cushions=True with confidence >= 70%.
Triggers (all respect 3h cooldown):
- period 30min: forecast precipitation > 0.5mm in next 2h
- state: sensor.home_precipitation_intensity >= 0.1mm/h
- state: weather.forecast_home transitions into rainy/pouring/snowy/hail
- service: pyscript.cushion_check_now (manual)
Adds TELEGRAM_BOT_TOKEN/TELEGRAM_CHAT_ID to HA container environment
(HA scrubs env_file vars but honors hardcoded environment entries).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>