Presence Detection Confusion

I recently got a few Screek 2A presence detectors to play and learn with. Got them working in HA with ease.

So now I have (among many other entities): binary_sensor.screek_human_sensor_2a_d1923c_any_presence

I’ve searched here and google for putting it use and there are many, many very different solutions and advice.

I thought I’d start with a simple card that shows one icon when the sensor is off and another when the sensor is on. But, I can’t figure out how best to do that.

Can someone suggest the best way to achieve this?

Thanks.

Does your presence detector have a “show as” option?

If so, you could experiment with those - some options (like motion) change the icon automatically.

It does have that option, and I can change it to “show as” motion.

But, what card should I use to show it?

I thought I’d have much more flexibility (hopefully, without code that is over my head).

Any card that shows entities like the Entity or Entities cards.

I’m sure it’s me, but I’m just not finding a way to make a nice display of occupied vs. not occupied.

I’m imagining a small square-ish card/button/icon that shows one image/color when binary sensor is on and a different one when off.

Oh…I get what you’re saying. The closest default card to what you want would be an entity card with the option turned on for “Color icons based on state”.

image

But you can install the Mushroom chips card. I just don’t know if there’s a way to change the color or icon based on the presence value without diving into the YAML or making a convoluted conditional setup.

To install the Mushroom cards…there’s instructions in the read me. This comes with a few different cards. After install, you’ll be able to add a “mushroom chips” card to your dashboards which can show just an icon.

Then you would add the card to a dashboard, click the “show code editor” button in the bottom left, and paste the code below in as a start. You’ll need to rename binary_sensor.media_room_micro_radar_presence to your presence entity. This will turn the icon blue when presence is detected and red when it’s not. If you want a different icon, just change the icon: mdi:account portion to whichever icon you want to use. You can look them all up on this site. When you find the icon you want to use, click it, click on the “Home Assistant” tab, and it’ll give the icon name. If you want to use different colors, then just change the appropriate icon_color line.

type: custom:mushroom-chips-card
chips:
  - type: conditional
    conditions:
      - condition: state
        entity: binary_sensor.media_room_micro_radar_presence
        state: 'on'
    chip:
      type: template
      entity: binary_sensor.media_room_micro_radar_presence
      icon: mdi:account
      icon_color: blue
  - type: conditional
    conditions:
      - condition: state
        entity: binary_sensor.media_room_micro_radar_presence
        state: 'off'
    chip:
      type: template
      entity: binary_sensor.media_room_micro_radar_presence
      icon: mdi:account
      icon_color: red
alignment: center

This will give an icon on the dashboard like this:
image

1 Like

That is exactly what I needed – thank you!

image

1 Like

Would you mind marking my reply as the solution? Trying to bump up my street cred :slight_smile: