Hi all, i have created an automation with the purpose collecting the last known value, before it gets unavailable. Its the last set Load (percentage) of my solar inverter. I want to see the last set/known value because im reading this information using a modbus connection. When the sun is under; i see a Unavailable regarding this modbus-integration.
Today the Growatt_MTL_Load had his last update on 17:46 UTC+2, but my Automation triggered twice:
OnthoudenGrowattLoadAdress3 triggered by state of Growatt_MTL_Load
9:15:22 AM - 12 hours ago - Traces
OnthoudenGrowattLoadAdress3 triggered by state of Growatt_MTL_Load
9:05:17 AM - 12 hours ago - Traces
This 09:05 is the first moment that the Growatt_MTL_Load sensor received '100'..
Im new to ha and automation, so no idea if i did something wrong, or if its valid. I made everything in de gui.
Automation:
alias: OnthoudenGrowattLoadAdress3
description: ""
triggers:
- trigger: state
entity_id:
- sensor.growatt_mtl_load
conditions:
- condition: template
value_template: "{{ trigger.to_state.state not in ['unknown', 'unavailable'] }}"
actions:
- action: input_number.set_value
metadata: {}
target:
entity_id: input_number.growattloadlastknown
data:
value: "{{ states('sensor.growatt_mtl_load') }}"
mode: single