Navaja

Generator ยท runs in your browser

Stop your sensor going "unknown" every five minutes

A template sensor whose source disappears for a second takes the whole thing down with it โ€” and ruins your history graph. An availability block fixes it.


    

What this fixes

Without an availability block, a template sensor whose source blinks for one second returns unknown โ€” and Home Assistant records that as a real value. Your energy graph gets a cliff, your averages get dragged down, and any automation watching the sensor fires on a number that never existed.

With it, the sensor goes unavailable instead: no value is recorded, the graph draws a gap, and everything picks up where it left off when the source comes back.

Questions people ask

What does availability actually do?

It tells Home Assistant when the sensor's value is meaningful. When the check fails the sensor goes unavailable instead of showing nonsense, and your statistics stay clean.

Why does this matter for graphs?

Because unknown is stored as a gap and often plotted as zero. One blink and your daily energy chart has a cliff in it.