Thanks, that makes sense to me but considering that power flow to the grid shows as
a negative numeric value, should I have
above: 2000
or
above: -2000
or
below: 2000
or
below: -2000
I have tried all 4 options and following a restart the switch does not turn on.
I have also tried without the time condition.
I have just read more about automation triggersâŚ
âFires when the numeric value of an entityâs state crosses (and only when crossing) a given threshold.â
In your case - is âto gridâ. The value would have to have been above -2000 before and then cross the limit for a below: -2000 to trigger. I think a HA restart wouldnât trigger this.
I would add some hysteresis instead of a timer in the ON condition.
So when the charger uses 2kW start it eg. at -2200 immediatly and stop it on above: 0. To avoid too short on-off cycles add some minimum ON time.
Sorry, I just noticed that I hadnât erased the âunit of measurementâ attribute line from your original post, and thatâs not what we need to use⌠its value will always be âWâ.
Assuming the state of the sensor is current value, and you are looking to trigger on when that value is more negative than -2000, then the following should be your trigger:
Thanks for the help guys. I now have my EV charger switched on (and off) for ânight rate powerâ and during the day switched on (and off) by the level of solar âpower flowâ.
I will document below my automations.yaml section to hopefully help others.
- id: '1638656798449'
alias: EV Charger on Solar
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.power_grid_fronius_power_flow_system_http_10_1_1_3
for:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
below: '-2000'
condition:
- condition: time
after: 07:15:00
before: '21:15:00'
action:
- service: switch.turn_on
target:
entity_id: switch.ev_charger
mode: single
- id: '1638848258276'
alias: EV Charger off Solar
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.power_grid_fronius_power_flow_system_http_10_1_1_3
for:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
above: '-100'
condition:
- condition: time
before: '21:15:00'
after: 07:15:00
action:
- service: switch.turn_off
target:
entity_id: switch.ev_charger
mode: single
Hello!
i want to use the same setup but the automation trigger does not work.
I also tried ist with âabove: 2000â and also with Numbers under 1.000 (in case the dot in 2.000 Watt causes the problem).
Does anyone has an idea what the problem is?
Iâm running the latest homeassistant OS on Raspi 4.
alias: Auto laden ab 2100 W
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.sb5_0_1av_41_783_grid_power
for:
hours: 0
minutes: 0
seconds: 10
attribute: ""
below: -2000
condition: []
action:
- service: switch.turn_on
data: {}
target:
entity_id: switch.wallboxpulsar_charge_control
enabled: true
mode: single
Below is from my automations.yaml for an automation created from the GUI.
(Also above I sent another working section on Dec 21 which has the same syntax as my new one)
It looks to me like your formatting or syntax or whatever it is called is different. (Note the spaces at the beginning of each line. E.G. 2 spaces before alias, 4 spaces before entity )
You could try editing yours manually but why not try creating it in the settings > automations GUI?
Also your screen shot is, I believe, showing 2429W of PV power which is not the same sensor you are using for the automation.
The automation using Grid Power will be a negative number if exporting to the grid. I do not know German but if you add the Grid Power sensor ( sensor.sb5_0_1av_41_783_grid_power) to your Home page you might see another reason why it may not be triggered yet.
thanks for the answer. I created this automation via gui. Above is only the yaml view, to have a better overview. Also the sensor âsensor.sb5_0_1av_41_783_grid_powerâ ist correct. Its the same as PV-Leistung (PV-Power) in the Gui. I checked the spaces and everthing is correct and removed the time condition (to have exactly your setup). But it doesnât work.
Could you tell me, what a value your PV Sensor shows? Is it possible that the Problem is the Value (the dot above 1.000 W oder have i add the W)?
I have a few sensors on my home page.
My PV Power one (at 7am today) shows 300W
My Grid Power shows 1,800W which means I am drawing power from the grid.
When I am exporting to the grid my Grid Power shows up to -4,500W
Unless your Grid Power gets below your threshold your automation will not trigger.
Your screen shot showed PV Power which, when your load is subtracted, would not leave enough exported to trigger your automation.
Try adding , Grid Power to your home page. (I really donât believe, as you stated, that your Grid Power is the same as your PV Power)
Ok, thank you! I think this was a misunderstanding. I only get one Value from my PV Converter and this is the grid Power Sensor. I think i misunderstood your setup, sorry!
However, i change the value from below -2100 to above 2100. This was not working before the last update (in my memory) but now it works as expected.
I also added a condition, that the wallbox switch have to be off. At the moment i try to test a second condition (that the wallbox status have to be âPreparingâ). If the wallbox is not in Preparing mode, no Car is connected. In the setup below this condition is deactivated.