Skip to content

Presence Detection Chip

Description

example-image

This chip shows you the actual presence in your home. Shows residents and guests (guests only if one or more).

Variables

Variable Default Required Notes
ulm_chip_presence_counter_residents This is the sensor that shows your residents counter.
ulm_chip_presence_counter_guests This is the sensor that shows your guests counter.

Usage

- type: 'custom:button-card'
  template: chip_presence_detection
  variables:
    ulm_chip_presence_counter_residents: sensor.people_home
    ulm_chip_presence_counter_guests: sensor.guests_home
Template Code
chip_presence_detection.yaml
---
### Chip Presence Detection ###
chip_presence_detection:
  template: "chips"
  triggers_update:
    - "[[[ return variables.ulm_chip_presence_counter_residents ]]]"
    - "[[[ return variables.ulm_chip_presence_counter_guests ]]]"
  label: |
    [[[
      if (!!variables.ulm_chip_presence_counter_guests) {
        return "🏠 " +  states[variables.ulm_chip_presence_counter_residents].state + " / " + states[variables.ulm_chip_presence_counter_guests].state;
      } else {
        return "🏠 " +  states[variables.ulm_chip_presence_counter_residents].state;
      }
    ]]]