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