As I can see, input number seems a box where I can put a number in. But I only need some sort of variable that changes through automation. But I don’t know how to set it up and manage it…
You can set the input number to any value using an automation. Just make a time-trigger that updates the input_number value.
You do not need to make the input_number visible in lovelace.
I know it’s an old thread, but I had the same question, and figured out how to do it using the sun.sun entity, without the need to create an input number and automation.
Here my card code:
type: custom:mini-graph-card
Name: Temperature
entities:
- entity: sensor.pool_water_temperature
name: Pool Water
- entity: sensor.nest_thermostat_temperature
name: Indoor
- entity: sensor.weatherbit_air_temperature
name: Outside
- color: gray
entity: sun.sun
name: Sun
show_line: false
show_points: false
show_legend: false
y_axis: secondary
show:
labels: true
labels_secondary: true
state_map:
- value: below_horizon
label: Night
- value: above_horizon
label: Day