I am trying to achieve the following, however I can’t find a way to do it. Maybe it’s very easy, but I’m stuck…
I want to make a sensor (or similar) which updates every day at midnight. This would basically set a certain meter reading of gas and a second sensor (or similar) would set the daily usage of gas. I don’t want to use a input_number, as it shouldn’t be able to change it manually.
Basically I would like to have a dummy sensor which I can update through automations.
I am not able to follow you exactly.
For the template sensor I need to set a value_template. But what should I put there?
And do I set the scan interval for only that template sensor? How?
Thanks! However, I don’t see how to add the scan interval to the template sensor. This is not clear to me from the page you linked and it’s not mentioned in the template sensor page at all.
Can you help me?
Are you sure that the scan interval is a valid option? Scan intervals are only on specific devices, not all sensors & platforms utilize the field. I.E. both template sensors and utility meter sensors do not use scan interval.
Where does this data actually come from? Template sensors can’t make external API calls, they can only massage other HA state into new state via templates. So how does the meter reading data get into this template? Is it actually the sensor which you only want to update at midnight or do you have an API or something which pulls meter reading data and you only want to call that at midnight?