EV Charger Smart Controller with Dynamic Pricing, Schedules, and Manual Overrides
Manage your Electric Vehicle charging based on electricity prices. Optionally configure time and/or state based overrides for when you need to charge. I had several different scripts and automations setup that have been working well for several months; however, I got tired of remembering how they interacted and simplified everything with this blueprint.
Key Features
- Cost Optimization: Automatically initiates charging when electricity prices drop below a threshold you configure.
- Scheduled Windows: Optionally restrict automated charging to defined hours and specific days of the week.
- Hardware Protection: Implements a configurable cooldown period to prevent the charger from toggling rapidly during brief price or sensor fluctuations.
- Manual Overrides: Supports timed sessions and state-based sessions (e.g., “Charge until Full”) using one or more triggers.
- Automation Mode Control: Utilizes a required Toggle Helper (input_boolean) to enable or disable the automation logic. Activating the toggle forces an immediate re-evaluation of all conditions while disabling it disables the charger and the automation logic. This functions differently than enabling or disabling the automation itself, as Home Assistant automations are trigger-based.
Requirements
- A numerical sensor providing real-time electricity pricing.
- A switch or input_boolean to control the charger hardware.
- A Toggle Helper (input_boolean) for the Automation Mode Control to facilitate state synchronization and safe deactivation.
Configuration Tips
- State-Based Overrides: Ensure the termination sensor updates often enough to be useful and that you are matching the correct state (this is case-sensitive). For example, the Tesla Fleet integration updates every 10 minutes and its charging sensor’s completion status is “complete”.
- Remove Car Schedules: Since the charging logic will be in Home Assistant, ensure you disable any scheduling restriction settings in the car.
- Charger Control with Helper: Some chargers (like my Grizzl-E) will re-enable themselves under certain conditions. To help prevent this automation from being out of sync, I have it set to control an input_boolean helper. I then setup a standalone automation that sets the charger state to match the helper toggle whenever either of them change.