royto / logbook-card

Logbook card for Home Assistant UI Lovelace
GNU General Public License v3.0
192 stars 9 forks source link

Custom logged events does not shows #125

Open wavelov3r opened 1 month ago

wavelov3r commented 1 month ago

Event:

service: logbook.log
data:
  name: Relay numero 7
  entity_id: switch.accesscontroller_relay_7
  message: E' stato aperto da  {{utente}}
  domain: switch
enabled: true

custom-logbook-card:

type: custom:multiple-logbook-card
desc: true
entities:
  - entity: switch.accesscontroller_relay_7
    hidden_state:
      - unavailable
    state_map:
      - label: aperto
        value: 'on'
      - label: chiuso
        value: 'off'
group_by_day: true
show:
  end_date: false
  start_date: true

Result:

image

But in the main logbook (in the first -and other- rows, there is the custom log not shown in the plugin) :

image

royto commented 1 month ago

Try to add custom_logs: true in your entity

type: custom:multiple-logbook-card
desc: true
entities:
  - entity: switch.accesscontroller_relay_7
    custom_logs: true
    hidden_state:
      - unavailable
    state_map:
      - label: aperto
        value: 'on'
      - label: chiuso
        value: 'off'
group_by_day: true
show:
  end_date: false
  start_date: true
ildar170975 commented 1 month ago

Just started testing this great card. May be I am doing smth wrong? Service call:

service: logbook.log
data:
  name: xxxx
  message: yyyy
  entity_id: sun.sun

How it is shown in a stock Logbook: изображение My logbook-card:

type: custom:logbook-card
entity: sun.sun
show_history: false
custom_logs: true

Result: изображение

With a stock card: изображение