Ahh! Sorry! Forgot about the new update - and went to the documentation to find it
NP. Btw i will open an Issue to make the Person Counters optional:
Make guest counter optional on chip_presence_detection Ā· Issue #75 Ā· UI-Lovelace-Minimalist/UI (github.com)
Thanks bud!
Making progress:
Doesnāt show people at home but its looking better!
Looks good on the phone but we are not showing at home there either. What am I missing?
Do the sensor you set up show amount of people at home?
Try adding the triggers_udate.
- type: 'custom:button-card'
template: chip_presence_detection
triggers_update: all
variables:
ulm_chip_presence_counter_residents: sensor.my_residents_counter
Oh snap. Shelly integration needed a reconfiguration. no prob with the cover card actully.
Add to my config.yaml or lovelace-minimalist.yaml?
- platform: template
sensors:
my_residents_counter:
friendly_name: "my_residents_counter"
value_template: >-
{{ [states.kim_lidberg, states.nattz_lidberg]
| selectattr('state', 'eq', 'home')
| list | count }}
My sensor.yaml file. But it still shows that no one is at home.
If your not going to use the guests sensor just use the chip_icon_state template instead of the chip_presence_detection. Btw, check first in dev tools if the sensor you made shows the correct state (x people homeā¦).
It did show 2 at home first! But now its not showing 0.
Maybe I f@cked it up! Getting late/early here so Iāll have a look at it tomorrow!
Millions thanks for all the help for far!
I modified the aircondition template a bit and use it as thermostat.
Basically two minor (but time at the time consuming) changes were required. I added a short statement for to calculate the new temperature with 0.5 steps and ātriggers_update: allā was required to keep the current temperature updated:
triggers_update: all
temperature: >
[[[ var temp = (states[variables.entity].attributes.temperature)-0.5;
return temp ]]]
HI, where you able to resolve the issue?
Try
{{ states.person | selectattr( 'state', 'eq', 'home') | list | length }}
Cool idea with the charging icon. Had to make a small adjustment to your template because on some devices the status is output as ācharingā and not āCharingā.
Also adjusted the default battery template so that an alarm is displayed when the battery falls below a certain threshold.
Looking good!
Got it to work! I was just tried and forgot to add: states.person.kim_
Thanks for the help!
Will probably ask for more help soon!
No, need to specify each person in an array. When using the code I posted above it works dynamically with all persons youāve specified.
This is the correct solution. I have the same in my configuration. Works perfectly!
Edit, my config:
template:
- sensor:
- name: "People home"
state: >-
{{ states.person | selectattr('state', 'eq', 'home') | list |count }}
Oh!
Had no idea.
- platform: template
sensors:
my_residents_counter:
friendly_name: "my_residents_counter"
value_template: >-
{{ [states.person.kim_lidberg, states.person.nattz_lidberg]
| selectattr('state', 'eq', 'home')
| list | count }}
I just did this and now its workingā¦
Btw @klidberg
Youāre still using the legacy template style. Not really wrong but something to keep in mind.
More info here: Template - Home Assistant
Can you tell me which card is this one with the weather info?