royto / logbook-card

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

Add an option to show the message below the name (with a custom log) #80

Closed mstuij closed 1 year ago

mstuij commented 1 year ago

The current behaviour is that you see:

{name of entity} - {message}

image

What I like to see is that it will presented on 2 lines, so in this example:

Rolluiken westkant Rolluiken westkant geopend

royto commented 1 year ago

Currently, it is the name and the message that are displayed

image

Maybe name use entity friendly name is not set

mstuij commented 1 year ago

When I execute this:

image

You get this:

image

And I like to see (with a new option)

This is subject This is the message

And it would be really great when you also could define the styling of the first and second line independently like bold or italic

royto commented 1 year ago

Just to be clear, you want something like this (with he date)

image

mstuij commented 1 year ago

Yes the the 2 lines. The date like the functionality that now already exists.

But I have created another issue to have a group date seperator (like the original logbook card)

And it would be a great bonus if you can specify the styling. So in my case I should set the subject to bold and the message to italic.

royto commented 1 year ago

Hi,

you can achieve this using card mod

As describe in the README.md, you can use the following configuration

type: custom:logbook-card
entity: light.living_room
card_mod:
  style: |
    .custom-log .item-content {
      display: flex;
      flex-direction: column;
    }
    .custom-log .custom-log__separator {
        display: none;
    }
    .custom-log .item-content .custom-log__name {
        font-weight: bold;
    }
    .custom-log .item-content .custom-log__message {
       font-style: italic;
       text-indent: 0px;
    }
mstuij commented 1 year ago

Thanks for the tip. There is only 1 problem that is that the - character is displayed. This should be hidden. Do you know if that is also possible?

image

royto commented 1 year ago

Make sure to have the 2.1.0 version

mstuij commented 1 year ago

I just updated some seconds ago and I saw that it works.

Thank you very much!