Commit Graph

124 Commits

Author SHA1 Message Date
claus 1dc0866fe3 Nu virker det 2026-03-22 07:49:16 +01:00
claus 5e368938bc tilpasset 2026-03-22 07:48:54 +01:00
claus 18c6b5e4cb feat(tesla): automate charge deadline to next morning
- Add daily automation to set tesla_charge_deadline at 07:00 next day (13:05 trigger)
- Add automation to update deadline when car is plugged in
- Ensures smart charging always has valid future window
- Eliminates manual deadline management
2026-03-22 07:48:31 +01:00
claus 70b78b6275 Improve garage closing logic using vehicle activity
- Only close garage when vehicle tracker is active (speed available)
- Prevents closing when leaving on foot or bike
- Add delay to ensure safe closing after departure
- Align closing logic with car-based opening conditions
2026-03-20 16:31:58 +01:00
claus 3d988314aa Use vehicle speed attribute to control garage opening
- Only open garage if SnowyWhite tracker has valid speed attribute
- Prevents false triggers when car is asleep (speed = unknown)
- Ensures garage opens only when arriving by car, not bike or foot
2026-03-20 07:27:35 +01:00
claus 1e71bc5372 feat(roborock): add mobile notifications for cleaning start, stop, and failure
- Send push notification on successful auto-start of cleaning
- Include elapsed empty-house time in start notification
- Add failure notification if robot fails to start after retries
- Notify when cleaning is stopped due to someone arriving home
- Ensure notifications only trigger on actual state outcomes (not attempts)
2026-03-19 19:02:05 +01:00
claus 81d9022052 identering 2026-03-19 17:21:41 +01:00
claus 1dfc634d9c Fix garage automation triggers and improve presence handling
- Update leaving trigger to fire on any transition from "home" (not just to "not_home")
- Handle zone-based states (e.g. Arbeit, Dybbroparken) correctly
- Relax SnowyWhite tracker condition to allow non-"not_home" states (fixes blocking on "unknown")
- Improve reliability of presence-based garage control
2026-03-19 16:29:19 +01:00
claus 8c1dded88e feat(roborock): make smart cleaning automation robust and deterministic
- Replace fragile `for:` trigger with timestamp-based empty-house logic
- Add input_datetime to track when house became empty
- Introduce time_pattern polling (every 5 min) to avoid missed triggers
- Add retry mechanism (up to 3 attempts) for starting cleaning
- Improve vacuum state handling (docked/idle/charging)
- Add race-safe stop automation when someone returns home
- Split logic into dedicated automations (tracking, reset, start, stop)
- Ensure daily run limit via input_number

Fixes issue where cleaning was not triggered due to presence sensor flapping/unavailable states.
2026-03-19 14:55:24 +01:00
claus ed6a67b7af oprydning 2026-03-19 07:00:15 +01:00
claus 290b0aa373 Update garage automation to use device_tracker and add notifications
- Replace sensor.claus_distance_home with device_tracker.clausiphone (home/not_home)
- Change triggers from numeric_state to state-based presence detection
- Adjust active time window to 05:00–23:00
- Add push notifications to mobile_app_clausiphone15 on garage open/close
2026-03-19 06:59:52 +01:00
claus a93cad7434 Fik ombyttet A og D 2026-03-18 19:15:03 +01:00
claus 2d51a1a41c Ændret tracker til unifi når kommer hjem 2026-03-18 07:04:25 +01:00
claus 800bc5b7ea tror det virker nu 2026-03-17 21:20:46 +01:00
claus 1f261ee8d2 Refactor Home Assistant Hue switch automations to use hue_event for improved reliability
* Replace multiple device-based automations with a single event-driven automation
* Eliminate duplicate `unique_id` conflicts
* Switch from device actions to service calls (`cover.open_cover`, `cover.close_cover`, `light.turn_on/off`)
* Add support for:

  * Short press (button 1) → open garage
  * Long press (button 1) → close garage
  * Short press (button 4) → turn off all lights
  * Long press (button 4) → turn on all lights
* Set `mode: restart` to improve responsiveness under rapid input
* Simplify structure for easier maintenance and debugging

Result: more stable and predictable Hue switch behavior
2026-03-17 16:22:35 +01:00
claus f1967f24cd fixes to get rid of startup messages 2026-03-17 06:59:06 +01:00
claus 5a9db0b8c2 improve(automation): increase reliability of tesla charging control
- Change mode to restart to prevent skipped runs
- Replace failsafe template trigger with time_pattern
- Add plugged-in condition to avoid unnecessary switching
- Add explicit deadline validation condition

Result:
- More reliable execution of charging logic
- Prevents missed failsafe activation
- Reduces unnecessary charger toggling
2026-03-17 06:18:50 +01:00
claus bed93b148f Get rid of warnings in the log 2026-03-16 21:03:57 +01:00
claus 8fa4db9d89 fix: add platform to tesla_smart_charge binary sensor and move to templates directory 2026-03-16 18:16:19 +01:00
claus 4a155ad545 feat: implement Tesla smart charging v3 for Zaptec
- Beregner manglende kWh baseret på SOC og charge limit
- Finder de billigste 15-min elspot-timer før deadline
- Starter/stopper opladning via switch.home_charging
- Tilføjer failsafe 1 time før deadline
- Håndterer connected_finished session reset automatisk
- Stopper opladning når charge limit er nået
- Fuld modulopdeling: input_datetime, templates, binary_sensors, automations
2026-03-16 16:51:30 +01:00
claus 45166fa647 diverse 2026-03-15 15:41:22 +01:00
claus 380353c44e støvsug 2026-03-15 15:39:46 +01:00
claus 904405237d receiver 2026-03-15 15:36:23 +01:00
claus 9214d3daea åbn garage 2026-03-15 15:35:55 +01:00
claus 9baac7742f lys kontor 2026-03-15 15:35:29 +01:00
claus fae90550ca daniel lys 2026-03-15 15:34:58 +01:00
claus f56e1a3196 bad 2026-03-15 15:34:37 +01:00
claus 3d589ba739 lys 2026-03-15 15:33:58 +01:00
claus d5c2a9cabb kommer hjem 2026-03-15 15:33:25 +01:00
claus 685764f7ae jule 2026-03-15 15:32:58 +01:00
claus 2cb9c552d6 godmorgen 2026-03-15 15:32:40 +01:00
claus 73dae481bd garagen er åben 2026-03-15 15:32:16 +01:00
claus e2c0cb04d6 dor 2026-03-15 15:31:18 +01:00
claus 1b6cd33f87 dor 2026-03-15 15:30:46 +01:00
claus 6961ebff7e klokke 2026-03-15 15:29:46 +01:00
claus 5bffdbab78 der er nogen 2026-03-15 15:24:42 +01:00
claus 5b4f8b09e8 Tænd lys når andreas kommer hjem og det er mørkt 2026-03-15 15:23:47 +01:00
claus 532611f6f9 Alarmer 2026-03-15 15:22:43 +01:00
claus 7d61321016 Kamera overvågning i indkørsel 2026-03-15 15:22:17 +01:00
claus 857bcd8585 Der skal være mørkere før det tændes 2023-12-28 18:54:49 +01:00
claus bac58b766a deleted name 2023-12-20 18:33:15 +01:00
claus 2a45576a80 adding new files 2023-12-19 15:47:05 +01:00
claus 9663410354 Editions 2023-12-19 15:46:15 +01:00
claus e3db44bced update 2023-04-11 07:08:32 +02:00
claus dfe18853d5 attempt to make notification 2023-04-11 07:06:27 +02:00
claus c21802c5a6 New alarms 2023-04-11 07:06:07 +02:00
claus c1fe22e73d add automations 2023-01-15 08:54:58 +01:00
claus e398bf4293 Various improvements on lighting 2023-01-11 06:58:07 +01:00
claus d0161f799c Justeret julelys 2022-11-26 10:30:34 +01:00
claus d14c3ed8bc Next edit 2022-11-16 17:43:50 +01:00