Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 107410

Adding multiple Smartphones to the configuration

$
0
0

Hi,
I am pretty nee to HomeAssistant - and running my Installation in a Debian based lxc.

Eversthing seems to be fine so far, but are the moment I struggle with one specific topic…

I am running the Smartphone App for android, and I’ve noticed that the battery indication is not working by Default in my Installation.

Therefore I’ve added the following Part to my configuration File:

sensor:
  - platform: template
    sensors:
      battery_phone:
        friendly_name: AndroidPhone Battery
        unit_of_measurement: '%'
        value_template: >-
            {%- if state_attr('device_tracker.xxxxx', 'battery_level') %}
                {{ state_attr('device_tracker.xxxxx', 'battery_level')|round }}
            {% else %}
                {{ states('device_tracker.xxxxx') }}
            {%- endif %}
        device_class: battery

and replaced the xxxxx with the device Name.
So gar, so good and it is running well…

But how can I add more devices?
What do I need to Change?

Any Help would bei much appretiated :slight_smile:
Thanks & with best regards

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 107410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>