Device Tracker not showing state

I’m having trouble getting the device tracker widget to display state information. I don’t see an icon or state text.

Here is what I have as my widget definition:

nick_presence:
    widget_type: device_tracker
    title: Nick
    device: a019c664e60a
    state_text: 1
    icon_on: fa-male
    icon_off: fa-male

And here is what is in known_devices.yaml:

a019c664e60a:
  hide_if_away: false
  mac: A0:19:C6:64:E6:0A
  name: Nick
  picture: /local/images/nick.jpg
  track: true

All I see is a blank tile with the title ‘Nick’. Any ideas?

When I inspect element I also see no state text:
<h1 class="state_text" data-bind="text: state_text, attr: {style: state_text_style}" style="color: #646464;"></h1>

This all points to your device_tracker not having a recognized state of either home or not_home. Can you verify what it’s state is with the dev tools?

I double checked that and it looks right.

device_tracker.a019c664e60a home

I also disconnected from wifi and verified that the away state switches to not_home

Are you having problems with any other widget types?

keith_presence:
    widget_type: device_tracker
    title: Keith
    device: samsungs5
    enable: 1
    icon_on: fa-male
    icon_style_active: "color: #4bcdea"

This is what mine looks like.

No other widget problems. I created a new test dashboard and copied the device tracker widget definition over and it works fine so it must be something on my end with my existing dashboard.

1 Like