I am fairly new to HA but I am trying to figure out if there is a way to store a measurement from a sensor and call an action based on its value around 18 hours later?
Basically, I need to take a sensor measurement at 9AM every day and based on that value trigger an action at 3:30 in the morning the next day (18.5 hours later).
I can see it can be done with delay function but is there a better way which avoids any mishaps from restarts, or reloads etc? Can HA actually store sensor values?
have a look at the Helpers: Settings → Devices → Helpers
There, you should be able to create a sensor, where you can manually input data.
Create a second Helper with the timestamp, when you would like to run your thing.
Then take a look at Automations: Settings → Automations
In the Triggers, choose “Time” and choose your timestamp-sensor.
No need for Conditions, choose your Action.
I have never done something like this before, but I should you get going. good luck and have fun playing around with HA.