Battery level of the phone

in my HA i have “device_tracker.life360_rpal” entitiy
and in its attributes there is battery level of the phone
my question is , how can i get it to show on the home page view
(under my photo)

Thanks
Refael

Look at this package, it will create battery sensors for all available devices with a battery.

Thanks Pippyn

Though the @NotoriousBDG package is a marvel of templating and very easy once you get to understand it, it is a bit complex… and leaves you with a lot of work in case you would ever want to get rid of all mqtt sensors being created automatically. If you simply need 1 sensor for your phone, see below how you could go about.
I would strongly suggest studying all the benefits in the package (as they are plenty) before implementing. Reading the thread gives you an idea of its possibilities and support on this community, which is truly great.

sensor:
  - platform: template
    sensors:

      refael_phone_battery:
        friendly_name: Refael phone battery
        unit_of_measurement: '%'
        value_template: >
          {% if state_attr('device_tracker.life360_rpal,'battery') %}
            {{ state_attr('device_tracker.life360_rpal','battery')|round }}
          {% else %}
            {{ states('sensor.battery_telefoon') }}
          {% endif %}
        device_class: battery
1 Like

Thanks Mariusthvdb