Commit Graph

224 Commits

Author SHA1 Message Date
claus 2ec90e316b add helper 2026-03-19 14:55:54 +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 5c90741847 Ændret alle "kommer hjem" trackers til unifi 2026-03-18 07:00:55 +01:00
claus 800bc5b7ea tror det virker nu 2026-03-17 21:20:46 +01:00
claus e4bf035082 fix(homeassistant): correct template binary_sensor structure for family presence
- Align template syntax with `!include_dir_merge_named` setup
- Remove invalid nested `template:` key from included file
- Add `unique_id` for proper entity registration and UI management
- Refactor state logic using list + select for cleaner evaluation
- (Optional) add explicit triggers to ensure reliable state updates

Fixes issue where `binary_sensor.family_presence` did not update correctly,
causing presence-based automations to fail.
2026-03-17 16:39:58 +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 dde5ff292a fix(template): correct and simplify tesla_charge_now logic
- Convert tesla_charge_now to binary_sensor
- Replace strptime with as_timestamp for robust time parsing
- Fix hour alignment (remove 15-min slot mismatch)
- Implement proper deadline filtering using timestamps
- Simplify template to minimal, readable logic

Result:
- Accurate identification of cheapest charging hours
- Eliminates false negatives in charge scheduling
2026-03-17 06:18:27 +01:00
claus bed93b148f Get rid of warnings in the log 2026-03-16 21:03:57 +01:00
claus da931bbca6 Make startup happy 2026-03-16 19:38:07 +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 8f0fd476c6 moved to template 2026-03-15 18:58:32 +01:00
claus 7f081cf997 ny fil 2026-03-15 18:57:59 +01:00
claus 66b69199d6 Vi dropper den for nu 2026-03-15 18:53:47 +01:00
claus 0cdfc2b1ee fejl i log 2026-03-15 18:50:17 +01:00
claus 944a6bd91e moved 2026-03-15 17:53:07 +01:00
claus 74c7577ad7 new templates 2026-03-15 17:43:05 +01:00
claus ada30d47d3 New way to make templates 2026-03-15 17:42:41 +01:00
claus cf8b18e497 Fixed error in log 2026-03-15 17:31:40 +01:00
claus 342b20d8d2 flyttet 2026-03-15 17:01:02 +01:00
claus ac79a32e3c flyttet 2026-03-15 17:00:37 +01:00
claus 807ebe619c diverse 2026-03-15 15:49:08 +01:00
claus cdc31eccb1 nattis 2026-03-15 15:48:02 +01:00
claus 8539ad7d0a source 2026-03-15 15:47:17 +01:00
claus 6a2134b0e9 overvaagning 2026-03-15 15:46:44 +01:00
claus d43c1086dd lys 2026-03-15 15:45:53 +01:00
claus 5518699e45 input 2026-03-15 15:45:28 +01:00
claus e2517cc0fe input 2026-03-15 15:45:07 +01:00
claus 173f556f7a input 2026-03-15 15:44:48 +01:00
claus b0829d6751 input 2026-03-15 15:44:24 +01:00
claus fdd90eee03 input 2026-03-15 15:44:01 +01:00
claus 62fd0880e0 input 2026-03-15 15:42:17 +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