Sure, here is the automation:
alias: Notify - Telegram Info Rolläden auf/zu
description: ""
trigger:
- platform: state
entity_id:
- cover.rolladen_haus
to: closed
id: RLZU
from: open
- platform: state
entity_id:
- cover.rolladen_haus
to: open
id: RLAUF
from: closed
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- RLZU
sequence:
- service: telegram_bot.send_message
data:
message: >-
Rolläden Haus wurden um {{ now().strftime("%H:%M") }} Uhr
geschlossen
title: "Information: "
- conditions:
- condition: trigger
id:
- RLAUF
sequence:
- service: telegram_bot.send_message
data:
message: Rolläden Haus um {{ now().strftime("%H:%M") }} Uhr geöffnet
title: "Information: "
mode: single
And this is the trace
{
"trace": {
"last_step": "action/0/choose/1/sequence/0",
"run_id": "8221fb17ad7bcf10a7d2d60e91b8dbd0",
"state": "stopped",
"script_execution": "finished",
"timestamp": {
"start": "2023-12-05T19:57:07.623273+00:00",
"finish": "2023-12-05T19:57:07.686006+00:00"
},
"domain": "automation",
"item_id": "1677957988149",
"trigger": "state of cover.rolladen_haus",
"trace": {
"trigger/1": [
{
"path": "trigger/1",
"timestamp": "2023-12-05T19:57:07.623306+00:00",
"changed_variables": {
"this": {
"entity_id": "automation.notify_telegram_info_rolladen_auf_zu",
"state": "on",
"attributes": {
"id": "1677957988149",
"last_triggered": "2023-12-05T19:51:39.855395+00:00",
"mode": "single",
"current": 0,
"friendly_name": "Notify - Telegram Info Rolläden auf/zu"
},
"last_changed": "2023-12-05T19:44:32.668906+00:00",
"last_updated": "2023-12-05T19:51:40.050449+00:00",
"context": {
"id": "01HGXRJG2FX7C7N36NB4H1BVA6",
"parent_id": "01HGXRJG2CETAB7REHZ1NGJEH2",
"user_id": null
}
},
"trigger": {
"id": "RLAUF",
"idx": "1",
"alias": null,
"platform": "state",
"entity_id": "cover.rolladen_haus",
"from_state": {
"entity_id": "cover.rolladen_haus",
"state": "closed",
"attributes": {
"current_position": 0,
"entity_id": [
"cover.rolladen_eg",
"cover.rolladen_og"
],
"device_class": "shutter",
"friendly_name": "Rolläden Haus",
"supported_features": 15
},
"last_changed": "2023-12-05T19:57:07.364105+00:00",
"last_updated": "2023-12-05T19:57:07.364105+00:00",
"context": {
"id": "01HGXRWFX12XE32E9HBD71368C",
"parent_id": null,
"user_id": null
}
},
"to_state": {
"entity_id": "cover.rolladen_haus",
"state": "open",
"attributes": {
"current_position": 1,
"entity_id": [
"cover.rolladen_eg",
"cover.rolladen_og"
],
"device_class": "shutter",
"friendly_name": "Rolläden Haus",
"supported_features": 15
},
"last_changed": "2023-12-05T19:57:07.622708+00:00",
"last_updated": "2023-12-05T19:57:07.622708+00:00",
"context": {
"id": "01HGXRWG53J48J1W2417W26898",
"parent_id": null,
"user_id": null
}
},
"for": null,
"attribute": null,
"description": "state of cover.rolladen_haus"
}
}
}
],
"action/0": [
{
"path": "action/0",
"timestamp": "2023-12-05T19:57:07.623913+00:00",
"changed_variables": {
"context": {
"id": "01HGXRWG57KF9KMSSGEH5RZ5M5",
"parent_id": "01HGXRWG53J48J1W2417W26898",
"user_id": null
}
},
"result": {
"choice": 1
}
}
],
"action/0/choose/0": [
{
"path": "action/0/choose/0",
"timestamp": "2023-12-05T19:57:07.624377+00:00",
"result": {
"result": false
}
}
],
"action/0/choose/0/conditions/0": [
{
"path": "action/0/choose/0/conditions/0",
"timestamp": "2023-12-05T19:57:07.624395+00:00",
"result": {
"result": false
}
}
],
"action/0/choose/1": [
{
"path": "action/0/choose/1",
"timestamp": "2023-12-05T19:57:07.624427+00:00",
"result": {
"result": true
}
}
],
"action/0/choose/1/conditions/0": [
{
"path": "action/0/choose/1/conditions/0",
"timestamp": "2023-12-05T19:57:07.624436+00:00",
"result": {
"result": true
}
}
],
"action/0/choose/1/sequence/0": [
{
"path": "action/0/choose/1/sequence/0",
"timestamp": "2023-12-05T19:57:07.624591+00:00",
"result": {
"params": {
"domain": "telegram_bot",
"service": "send_message",
"service_data": {
"message": "Rolläden Haus um 20:57 Uhr geöffnet",
"title": "Information: "
},
"target": {}
},
"running_script": false
}
}
]
},
"config": {
"id": "1677957988149",
"alias": "Notify - Telegram Info Rolläden auf/zu",
"description": "",
"trigger": [
{
"platform": "state",
"entity_id": [
"cover.rolladen_haus"
],
"to": "closed",
"id": "RLZU",
"from": "open"
},
{
"platform": "state",
"entity_id": [
"cover.rolladen_haus"
],
"to": "open",
"id": "RLAUF",
"from": "closed"
}
],
"condition": [],
"action": [
{
"choose": [
{
"conditions": [
{
"condition": "trigger",
"id": [
"RLZU"
]
}
],
"sequence": [
{
"service": "telegram_bot.send_message",
"data": {
"message": "Rolläden Haus wurden um {{ now().strftime(\"%H:%M\") }} Uhr geschlossen",
"title": "Information: "
}
}
]
},
{
"conditions": [
{
"condition": "trigger",
"id": [
"RLAUF"
]
}
],
"sequence": [
{
"service": "telegram_bot.send_message",
"data": {
"message": "Rolläden Haus um {{ now().strftime(\"%H:%M\") }} Uhr geöffnet",
"title": "Information: "
}
}
]
}
]
}
],
"mode": "single"
},
"blueprint_inputs": null,
"context": {
"id": "01HGXRWG57KF9KMSSGEH5RZ5M5",
"parent_id": "01HGXRWG53J48J1W2417W26898",
"user_id": null
}
},
"logbookEntries": [
{
"name": "Notify - Telegram Info Rolläden auf/zu",
"message": "triggered by state of cover.rolladen_haus",
"source": "state of cover.rolladen_haus",
"entity_id": "automation.notify_telegram_info_rolladen_auf_zu",
"context_id": "01HGXRWG57KF9KMSSGEH5RZ5M5",
"when": 1701806227.623383,
"domain": "automation"
}
]
}