Closed dummylabs closed 10 months ago
Can you provide the response of the call to /api/logbook (tab network in developper tools of your browser (F12)) ?
I cropped two last entries which should be relevant to the issue. If you need full response please let me know:
[
{
"when": "2023-12-24T20:22:19.951294+00:00",
"name": "INFO",
"message": "test from automation",
"domain": "input_button",
"entity_id": "input_button.dummy_logbook_entity",
"context_event_type": "automation_triggered",
"context_domain": "automation",
"context_name": "logme",
"context_message": "triggered",
"context_entity_id": "automation.logme",
"context_entity_id_name": "logme"
},
{
"when": "2023-12-24T20:22:25.347013+00:00",
"name": "INFO",
"message": "test from script",
"domain": "input_button",
"entity_id": "input_button.dummy_logbook_entity",
"context_user_id": "240fb308210447b68ee94a719d7c7c77",
"context_domain": "script",
"context_service": "test_script",
"context_event_type": "call_service"
}
]
I have been doing some trial/error with the custom logs and I also faced this issue. I have no idea if it's related to this issue, but I noticed the following error in my browser console. I'm currently on HA 2024.1.0b4
First of all, your card is amazing and I really can't live without it anymore! š
Describe the bug I have a simple script which I'd like to reuse in my automations and scripts to capture some custom events. It works just fine when I call it from an automation or execute it directly from Administrative tools console.
Now to the problem: if I run my script from another script, the logbook entry is being created and is visible in the Logbook panel, but it is not shown in the logbook card. From the Logbook panel perspective the only visual difference is "triggered by" statement. See screenshots below.
To Reproduce The logger script:
Call it from automation (event is shown in logbook-card):
Call it from a script (event is not shown in logbook-card)
Expected behavior Logbook entries, created from a script, which was invoked from another script, are shown in the logbook-card.
Screenshots
Screen 1: both events are shown in the Logbook panel
Screen 2: only one event is shown in the logbook-card (only when the script has been invoked from automation)
Environment (please complete the following information):
Card configuration