bramkragten / swipe-card

Card that allows you to swipe throught multiple cards for Home Assistant Lovelace
245 stars 36 forks source link

Swipe Card and logbook #36

Open alvinchen1 opened 3 years ago

alvinchen1 commented 3 years ago

Hi,

Love swipe card, it's great. I am having some problems with logbook card. I have this as an example:

type: custom:swipe-card
cards:
  - type: entity-filter
    entities:
      - entity: binary_sensor.front_door_motion
        name: Front Door
      - entity: binary_sensor.living_room_motion_sensor_motion
        name: Living Room
      - entity: binary_sensor.kitchen_motion_sensor_motion
        name: Kitchen
      - entity: binary_sensor.rear_patio_motion
        name: Rear Patio
    state_filter:
      - 'on'
    card:
      type: entities
      title: Motion
  - type: logbook
    entities:
      - binary_sensor.front_door_motion
      - binary_sensor.living_room_motion_sensor_motion
      - binary_sensor.kitchen_motion_sensor_motion
      - binary_sensor.rear_patio_motion
    hours_to_show: 2
    title: Motion Log

My idea is default card is entity filter, and if I need more information, I would swipe right and get the log. But the logbook does not ever render. Anyone else experiencing this? Thanks so much for your work.

ildar170975 commented 2 years ago

Start with a simpler case:

type: custom:swipe-card
cards:
  - type: entities
    entities:
      - sun.sun
  - type: logbook
    entities:
      - sun.sun

it works. The case with added more entities - works too.

This case with entity-filter - works too:

type: vertical-stack
cards:
  - type: entities
    entities:
      - input_boolean.test_boolean
      - input_boolean.test_boolean_2
      - input_boolean.test_boolean_3
  - type: custom:swipe-card
    cards:
      - type: entity-filter
        entities:
          - input_boolean.test_boolean
          - input_boolean.test_boolean_2
          - input_boolean.test_boolean_3
        state_filter:
          - 'on'
        card:
          type: entities
      - type: logbook
        hours_to_show: 48
        entities:
          - input_boolean.test_boolean
          - input_boolean.test_boolean_2
          - input_boolean.test_boolean_3

изображение

изображение