Hi all,
In my home I work a lot with different scenes to manage my lights.
I want to be able to create a custom sensor that shows the last activated scene either manual activated or by automation.
Gebeurtenis 0 afgevuurd 18:15:
{
"event_type": "call_service",
"data": {
"domain": "scene",
"service": "turn_on",
"service_data": {
"entity_id": "scene.dark"
}
},
"origin": "LOCAL",
"time_fired": "2021-01-20T17:15:13.719248+00:00",
"context": {
"id": "33a8c5338c37b18e45f2c47e4448d5f3",
"parent_id": null,
"user_id": "7603683a9d474002ba633c4a55f1fcc8"
}
}
Basically I want the data.service_data.entity_id component of this response and then split scene.dark at the β.β character and change the state of a sensor to the last part (dark). But I canβt figure out how to get the data I want.
Maybe you could help me with this.