fix: Update template sensors to modern syntax
This commit is contained in:
@@ -14,28 +14,6 @@ homeassistant:
|
||||
sensor.jp_presence_status:
|
||||
entity_picture: https://gravatar.com/avatar/e78e623948f3675cf1c51544f9bec928
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Proximity Sensors for Zones (deprecated in HA 2024.2)
|
||||
# proximity:
|
||||
# home:
|
||||
# devices:
|
||||
# - device_tracker.jen_iphone
|
||||
# - device_tracker.j_p_s_iphone
|
||||
# tolerance: 50
|
||||
# unit_of_measurement: km
|
||||
|
||||
# jpk:
|
||||
# devices:
|
||||
# - device_tracker.j_p_s_iphone
|
||||
# tolerance: 50
|
||||
# unit_of_measurement: km
|
||||
|
||||
# jen:
|
||||
# devices:
|
||||
# - device_tracker.jen_iphone
|
||||
# tolerance: 50
|
||||
# unit_of_measurement: km
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Extended Presence States
|
||||
input_select:
|
||||
@@ -68,48 +46,35 @@ input_select:
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Extended Presence Sensors
|
||||
binary_sensor:
|
||||
|
||||
# Home / Not-Home Sensors
|
||||
- platform: template
|
||||
sensors:
|
||||
jp_presence:
|
||||
friendly_name: J.P.
|
||||
template:
|
||||
- binary_sensor:
|
||||
- default_entity_id: binary_sensor.jp_presence
|
||||
device_class: presence
|
||||
value_template: "{{ is_state('person.jpk', 'home') }}"
|
||||
name: J.P.
|
||||
state: '{{ is_state("person.jpk", "home") }}'
|
||||
|
||||
jen_presence:
|
||||
friendly_name: Jen
|
||||
- default_entity_id: binary_sensor.jen_presence
|
||||
device_class: presence
|
||||
value_template: "{{ is_state('person.jen', 'home') }}"
|
||||
name: Jen
|
||||
state: '{{ is_state("person.jen", "home") }}'
|
||||
|
||||
house_presence:
|
||||
friendly_name: House
|
||||
- default_entity_id: binary_sensor.house_presence
|
||||
device_class: presence
|
||||
value_template: >-
|
||||
{{ is_state('person.jpk', 'home')
|
||||
or is_state('person.jen', 'home') }}
|
||||
name: House
|
||||
state: '{{ is_state("person.jpk", "home") or is_state("person.jen", "home") }}'
|
||||
|
||||
sensor:
|
||||
- sensor:
|
||||
- default_entity_id: sensor.jp_presence_status
|
||||
name: J.P. Presence Status
|
||||
state: '{{ states.input_select.jp_presence_state.state }}'
|
||||
|
||||
# Extended Presence Status
|
||||
- platform: template
|
||||
sensors:
|
||||
jp_presence_status:
|
||||
value_template: '{{ states.input_select.jp_presence_state.state }}'
|
||||
friendly_name_template: 'J.P. Presence Status'
|
||||
- default_entity_id: sensor.jen_presence_status
|
||||
name: Jen Presence Status
|
||||
state: '{{ states.input_select.jen_presence_state.state }}'
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
jen_presence_status:
|
||||
value_template: '{{ states.input_select.jen_presence_state.state }}'
|
||||
friendly_name_template: 'Jen Presence Status'
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
house_presence_status:
|
||||
value_template: '{{ states.input_select.house_presence_state.state }}'
|
||||
friendly_name_template: 'House Presence Status'
|
||||
- default_entity_id: sensor.house_presence_status
|
||||
name: House Presence Status
|
||||
state: '{{ states.input_select.house_presence_state.state }}'
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Automations for Presence Detection
|
||||
|
||||
Reference in New Issue
Block a user