wattmatters
Established Member
- Joined
- Sep 29, 2023
- Messages
- 679
- Reaction score
- 704
- Points
- 214
- Location
- Bellingen, NSW Australia
- Driving
- MG4 Trophy LR
I have a home energy monitoring system (Iotawatt) integrated with HA. One of the circuits it monitors is the EV charging circuit. So I have a HA automation which polls the car every 10 minutes if the EV circuit power draw exceeds 500 W:I also need to get it refreshing when I plug in etc... sometimes delays quite a bit and I have to enforce an update.
Code:
alias: "EV - SAIC Start polling when charge session starts "
description: ""
trigger:
- platform: numeric_state
entity_id:
- sensor.input_10_garage_ev
for:
hours: 0
minutes: 0
seconds: 10
above: 500
- platform: time_pattern
minutes: /10
condition:
- condition: numeric_state
entity_id: sensor.input_10_garage_ev
above: 500
action:
- service: select.select_option
metadata: {}
data:
option: force
target:
entity_id: select.<mycarID>_gateway_refresh_mode
mode: single
I'm not sure it's actually necessary to poll every 10 minutes as I think all it needs is the initial poll after which the integration keeps doing so periodically, with a polling frequency adjusted based on the charge rate.
I may adjust that automation to just do it once and see how it goes.