My garage door automation consists of a relay to trigger the opener and a tilt sensor to detect the door status. I use a template to show the status of my garage door in lovelace as an open or closed door icon. This all works great but when I click the sensor, I see no log data because it’s the status of the template and not of the tilt sensor. Is there a way to see the tilt sensor data when I view the logs of this template?
example of no status:
My sensors are defined as:
- name: "Single Garage Door Sensor"
state_topic: "shellies/shelly1-3C6105E3A497/input/0"
unique_id: "single_garage_door_sensor"
qos: 1
payload_on: "1"
payload_off: "0"
- name: "Single Garage Door Relay"
unique_id: "single_garage_door"
payload_on: "on"
payload_off: "off"
qos: 1
state_topic: "shellies/shelly1-3C6105E3A497/relay/0"
command_topic: "shellies/shelly1-3C6105E3A497/relay/0/command"
json_attributes_topic: "shellies/shelly1-3C6105E3A497/info"
single_garge_door_template:
friendly_name: "Single Garage Door"
unique_id: "single_garage_door_template"
value_template: "{{ is_state('switch.single_garage_door', 'on') }}"
turn_on:
service: switch.turn_on
target:
entity_id: switch.single_garage_door
turn_off:
service: switch.turn_on
target:
entity_id: switch.single_garage_door
icon_template: >-
{% if is_state('binary_sensor.single_garage_door_sensor', 'on') %}
mdi:garage
{% else %}
mdi:garage-open
{% endif %}