mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
58 lines
2.5 KiB
YAML
58 lines
2.5 KiB
YAML
template:
|
|
- binary_sensor:
|
|
- name: White Bed Occupied
|
|
unique_id: 909df431-a6a9-4b0a-b923-2b63fc425df5
|
|
state: "{{ is_state('binary_sensor.bed_presence_2d14a4_bed_occupied_either', 'on') }}"
|
|
icon: >
|
|
{%- if is_state("binary_sensor.white_bed_occupied", "on") %}
|
|
mdi:bed
|
|
{%- elif is_state('binary_sensor.bed_presence_2d14a4_bed_occupied_either', 'off') %}
|
|
mdi:bed-empty
|
|
{%- else %}
|
|
mdi:bed-outline
|
|
{%- endif %}
|
|
|
|
- name: Master Bed Occupied
|
|
unique_id: a5620335-43a1-47ce-bf37-ac8433f3a406
|
|
state: "{{ is_state('binary_sensor.bed_presence_c175a4_bed_occupied_either', 'on') }}"
|
|
icon: >
|
|
{% if is_state("binary_sensor.master_bed_occupied", "on") %}
|
|
mdi:bed-king
|
|
{% else %}
|
|
mdi:bed-king-outline
|
|
{% endif %}
|
|
|
|
- name: Master Bed Left Occupied
|
|
unique_id: d7956371-58d2-4c44-9121-a0fba2fd6904
|
|
state: "{{ is_state('binary_sensor.bed_presence_c175a4_bed_occupied_left', 'on') }}"
|
|
icon: >
|
|
{% if is_state("binary_sensor.master_bed_left_occupied", "on") %}
|
|
mdi:bed-king
|
|
{% else %}
|
|
mdi:bed-king-outline
|
|
{% endif %}
|
|
|
|
- name: Master Bed Right Occupied
|
|
unique_id: 93e5782c-f7ad-4e2f-a8d5-da7fc7e6d31d
|
|
state: "{{ is_state('binary_sensor.bed_presence_c175a4_bed_occupied_right', 'on') }}"
|
|
icon: >
|
|
{% if is_state("binary_sensor.master_bed_right_occupied", "on") %}
|
|
mdi:bed-king
|
|
{% else %}
|
|
mdi:bed-king-outline
|
|
{% endif %}
|
|
|
|
- sensor:
|
|
- name: ESPHome Pending Updates
|
|
unique_id: 767eeda3-b70e-4e8f-96a8-e7031badaf0d
|
|
state: "{{ states.update | selectattr('state', 'eq', 'on') | map(attribute='entity_id') | select ('in',integration_entities('esphome')) | list | count }}"
|
|
icon: mdi:chip
|
|
attributes:
|
|
devices: "{{ states.update | selectattr('state', 'eq', 'on') | map(attribute='entity_id') | select ('in',integration_entities('esphome')) | list }}"
|
|
|
|
- name: ESPHome Offline Devices
|
|
unique_id: c17e967e-e3ff-42dd-a85c-a5c1d1e9ae63
|
|
state: "{{ integration_entities('esphome') | select('search', 'status') | select('is_state', 'off') | list | count }}"
|
|
icon: mdi:chip
|
|
attributes:
|
|
devices: "{{ integration_entities('esphome') | select('search', 'status') | select('is_state', 'off') | list }}" |