Commit Graph

13 Commits

Author SHA1 Message Date
claus 8fa01e1eb4 slettet 2026-03-22 07:51:34 +01:00
claus 5eae8e1d6a nu virker det 2026-03-22 07:50:18 +01:00
claus 5cfb27c3ad Refactor Tesla charging templates to modern template syntax
- Converted all Tesla sensors and binary_sensors to the modern
  `template:` integration format compatible with Home Assistant 2026+
- Combined kWh needed, charge hours, and smart charging decision
  into a single template file for inclusion via !include_dir_merge_named
- Preserves existing behavior while preparing for future HA versions
- Legacy template warnings remain for binary_sensor but functionality works
2026-03-20 20:19:50 +01:00
claus 5c90741847 Ændret alle "kommer hjem" trackers til unifi 2026-03-18 07:00:55 +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 f1967f24cd fixes to get rid of startup messages 2026-03-17 06:59:06 +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 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 7f081cf997 ny fil 2026-03-15 18:57:59 +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