AutomationDataset/Falcon4Tech/automation-descriptions.json

15 lines
2.0 KiB
JSON

[
{
"id": "Tesla Charge Current",
"result": {
"structured": "TRIGGER: Every 15 minutes (time pattern). CONDITIONS: location device tracker [device_tracker.location] is home AND charging sensor [sensor.charging] is charging AND remains in that state for 10 minutes. ACTIONS: Calculate variables: full_ts (timestamp of time to full charge sensor [sensor.time_to_full_charge]), now_ts (current timestamp), desired_ts (timestamp for 06:35 today), difference (full_ts - now_ts), delta (difference - (desired_ts - now_ts)), current_amp (charge current number [number.charge_current] value, default 24), min_amp (16), max_amp (32), step (3 if delta > 7200, 2 if delta > 3600, otherwise 1). THEN, choose: IF (delta > 600) AND (current_amp < max_amp) THEN set charge current number [number.charge_current] to min(max_amp, current_amp + step). ELSE IF (delta < -600) AND (current_amp > min_amp) THEN set charge current number [number.charge_current] to max(min_amp, current_amp - step). OTHERWISE do nothing.",
"natural_language": {
"trigger": "The automation runs every 15 minutes.",
"conditions": "The location device tracker [device_tracker.location] must report 'home', and the charging sensor [sensor.charging] must be in the 'charging' state for at least 10 continuous minutes.",
"action": "The automation calculates the difference between the current estimated time to full charge and a target finish time of 6:35 AM. Based on this difference, it adjusts the charge current number [number.charge_current] up or down in steps to try and have the charging finish close to the target time. It will increase the current if charging is projected to finish too late, and decrease it if it's projected to finish too early, respecting minimum and maximum current limits."
},
"human_like": "Automatically adjusts the Tesla's charging rate every 15 minutes to aim for a full battery around 6:35 AM, but only when the car is at home and actively charging.",
"complexity": "high"
}
}
]