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.
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”.
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: