{ "alias": "Zigbee — учебная диагностика состояния", "triggers": [ { "trigger": "state", "entity_id": "binary_sensor.zigbee_example_contact", "to": "unavailable", "for": {"minutes": 15} }, { "trigger": "state", "entity_id": "binary_sensor.zigbee_example_contact", "to": "unknown", "for": {"minutes": 15} } ], "conditions": [ { "condition": "template", "value_template": "{{ trigger.to_state is not none and trigger.to_state.state in ['unknown', 'unavailable'] and states(trigger.entity_id) == trigger.to_state.state }}" } ], "actions": [ { "action": "logbook.log", "data": { "name": "Учебная диагностика Zigbee", "entity_id": "binary_sensor.zigbee_example_contact", "message": "{{ trigger.entity_id }} остаётся в состоянии {{ trigger.to_state.state }} после периода ожидания. Проверьте источник данных; причина не установлена." } } ], "mode": "single" }