Entity value into sensor value


Hope everyone is well.

I am trying to take a value from an entity and then that entity into a sensor value (to use on Lovelace to display a gauge from 0-100%).

The entity is as follows:

Entity: Battery_Level

Any ideas, I am thinking a template sensor?


Do it.

{{ state_attr('climate.kitchen','battery_level') }}

Does this go in the Lovelace gauge or within the YAML config?


Create a template sensor for the entity attribute in configuration.yaml and add a Gauge card for it in Lovelace.

1 Like

Thanks! :wink: