Closed alphasixtyfive closed 1 year ago
Add show_history
: false to your config this issue.
type: custom:logbook-card
entity: input_button.logbook_tasker
custom_logs: true
show_history: false
I'll update documentation to clarify this
Add
show_history
: false to your config this issue.type: custom:logbook-card entity: input_button.logbook_tasker custom_logs: true show_history: false
I'll update documentation to clarify this
Thanks, however this did not help.
Can you confirm that you are using the last version of the card ?
I do. The version is 2.0.1. Perhaps it would help if I provided an output of API call to history endpoint?
In an unusual turn of events it actually outputs unknown
:
http://XXX:8123/api/history/period/2023-11-13T00%3A00%3A00.000Z?filter_entity_id=input_button.logbook_tasker
[
[
{
"entity_id": "input_button.logbook_tasker",
"state": "unknown",
"attributes": {
"icon": "mdi:math-log",
"friendly_name": "Logbook Tasker"
},
"last_changed": "2023-11-13T00:00:00+00:00",
"last_updated": "2023-11-13T00:00:00+00:00"
},
{
"entity_id": "input_button.logbook_tasker",
"state": "unknown",
"attributes": {
"icon": "mdi:math-log",
"friendly_name": "Logbook Tasker"
},
"last_changed": "2023-11-13T10:03:21.707839+00:00",
"last_updated": "2023-11-13T10:03:21.707839+00:00"
},
{
"entity_id": "input_button.logbook_tasker",
"state": "unknown",
"attributes": {
"icon": "mdi:math-log",
"friendly_name": "Logbook Tasker"
},
"last_changed": "2023-11-13T23:33:03.107622+00:00",
"last_updated": "2023-11-13T23:33:03.107622+00:00"
}
]
]
This is the output of /api/logbook
on the other hand:
[
{
"when": "2023-11-13T21:31:17.606946+00:00",
"name": "com.pyronixhc2.android.app",
"message": "13/11/23 21:31:31: Saturn External Beam: Armed by: User 01",
"domain": "input_button",
"entity_id": "input_button.logbook_tasker",
"context_event_type": "automation_triggered",
"context_domain": "automation",
"context_name": "Tasker event receiver log",
"context_message": "triggered by event 'tasker'",
"context_source": "event 'tasker'",
"context_entity_id": "automation.tasker_event_receiver_log",
"context_entity_id_name": "Tasker event receiver log"
},
{
"when": "2023-11-13T21:31:37.895000+00:00",
"name": "com.pyronixhc2.android.app",
"message": "13/11/23 21:31:51: Saturn External Beam: Disarmed: User 01",
"domain": "input_button",
"entity_id": "input_button.logbook_tasker",
"context_event_type": "automation_triggered",
"context_domain": "automation",
"context_name": "Tasker event receiver log",
"context_message": "triggered by event 'tasker'",
"context_source": "event 'tasker'",
"context_entity_id": "automation.tasker_event_receiver_log",
"context_entity_id_name": "Tasker event receiver log"
}
]
there is a pb with show_history
. I'll check that
Many thanks for taking the time to look into this, however this did not solve the issue. With show_history
set to false
it shows a No event on the period
message, and when you set it it to true
it once again shows a single Unknown
entry.
ok. Seems that when you log using your automation, it is not setting the context_service
property to log
on which I'm filtering on ...
ok. Seems that when you log using your automation, it is not setting the
context_service
property tolog
on which I'm filtering on ...
I might be wrong but shouldn't you just filter by entity_id
or domain
?
the call to the api is already filtered per entity.
I think I will autorize log with "context_domain": "automation"
Version 2.1.0 should fix the issue
It works now, thank you!
Describe the bug
For some reason I'm getting a single "Unknown" entry whenever
Although default logbook card displays it just fine:
Card configuration