Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add lovelace examples to readme #99

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chelming
Copy link

I've spent like 5 hours working on displaying the data from the integration and came up with some nice methods using the auto-entities card.

Here's a screenshot with some of the examples:
image

Signed-off-by: Chris Helming <[email protected]>
@chelming
Copy link
Author

added a sign-off because apparently that's a thing 😅

@chelming
Copy link
Author

maybe you could add a wiki page with lovelace examples that people could share?

@chelming
Copy link
Author

chelming commented Mar 5, 2024

saving this screenshot here so I don't lose it
image

@kjohns3
Copy link

kjohns3 commented Jul 1, 2024

Hey @chelming, thanks for sharing the lovelace (screenshots/yaml) examples. Correct me if I'm wrong, but it looks like you're using the fold-entity-row card in your latest sample image. I'd be curious to see an expanded version of the image and the yaml you're using. I really like the idea of only showing a limited (important) view by default and giving the option to show more if needed. Thanks again for sharing.

@chelming
Copy link
Author

chelming commented Jul 1, 2024

image

title: Home
icon: mdi:shield-home
badges:
  - entity: lock.front_door_deadbolt
    icon: mdi:lock-check
    name: Front
    show_name: true
    card_mod:
      style: |
        :host {
          {% if states(config.entity) == 'locked' %}
          --card-mod-icon: mdi:lock-check;
          --label-badge-red: green;
          {% else %}
          --card-mod-icon: mdi:lock-alert;
          --label-badge-red: red;
          {% endif %}
          
        }
  - entity: lock.side_door_deadbolt
    icon: mdi:home
    name: Side
    show_name: true
    card_mod:
      style: |
        :host {
          {% if states(config.entity) == 'locked' %}
          --card-mod-icon: mdi:lock-check;
          --label-badge-red: green;
          {% else %}
          --card-mod-icon: mdi:lock-alert;
          --label-badge-red: red;
          {% endif %}
        }
  - entity: lock.back_door_deadbolt
    icon: mdi:home
    name: Back
    show_name: true
    card_mod:
      style: |
        :host {
          {% if states(config.entity) == 'locked' %}
          --card-mod-icon: mdi:lock-check;
          --label-badge-red: green;
          {% else %}
          --card-mod-icon: mdi:lock-alert;
          --label-badge-red: red;
          {% endif %}
        }
cards:
  - type: vertical-stack
    cards:
      - states:
          - arm_home
          - arm_away
          - arm_night
        type: alarm-panel
        entity: alarm_control_panel.alarm_partition_1
        name: Alarm
      - type: custom:auto-entities
        card:
          type: entities
          title: Open zones
        filter:
          include:
            - attributes:
                zone: $$*
              state: "on"
              options:
                state_color: true
                secondary_info: last-updated
          exclude:
            - entity_id: binary_sensor.alarm_zone_1
        sort:
          method: attribute
          attribute: zone
          numeric: true
        show_empty: false
      - type: custom:expander-card
        title: All activity
        cards:
          - type: custom:auto-entities
            card:
              type: entities
              title: null
            filter:
              include:
                - attributes:
                    zone: $$*
                  last_changed: ">= 1h ago"
                  options:
                    state_color: true
                    secondary_info: last-updated
              exclude:
                - entity_id: binary_sensor.alarm_zone_1
            sort:
              method: last_changed
              reverse: true
        title-card:
          type: custom:auto-entities
          card:
            type: entities
            title: Recent zones (<1 hr)
          filter:
            include:
              - attributes:
                  zone: $$*
                last_changed: < 1h ago
                options:
                  state_color: true
                  secondary_info: last-updated
            exclude:
              - entity_id: binary_sensor.alarm_zone_1
          sort:
            method: last_changed
            reverse: true
  - type: vertical-stack
    cards:
      - type: custom:expander-card
        title: Office
        cards:
          - type: entities
            entities:
              - entity: binary_sensor.alarm_zone_7
              - entity: binary_sensor.alarm_zone_8
              - entity: binary_sensor.alarm_zone_9
              - entity: binary_sensor.alarm_zone_10
            state_color: true
        title-card:
          type: entity
          entity: sensor.alarm_office_ready
          state_color: true
        title-card-button-overlay: false
      - type: custom:expander-card
        title: Downstairs
        cards:
          - type: entities
            entities:
              - entity: binary_sensor.alarm_zone_4
              - entity: binary_sensor.alarm_zone_5
              - entity: binary_sensor.alarm_zone_6
              - entity: binary_sensor.alarm_zone_11
              - entity: binary_sensor.alarm_zone_12
              - entity: binary_sensor.alarm_zone_13
            state_color: true
        title-card:
          type: entity
          entity: sensor.alarm_downstairs_ready
          state_color: true
        title-card-button-overlay: false
        clear: false
      - type: custom:expander-card
        title: Upstairs
        cards:
          - type: entities
            entities:
              - entity: binary_sensor.alarm_zone_14
              - entity: binary_sensor.alarm_zone_15
              - entity: binary_sensor.alarm_zone_16
              - entity: binary_sensor.alarm_zone_17
              - entity: binary_sensor.alarm_zone_18
              - entity: binary_sensor.alarm_zone_19
              - entity: binary_sensor.alarm_zone_20
              - entity: binary_sensor.alarm_zone_21
            state_color: true
        title-card:
          type: entity
          entity: sensor.alarm_upstairs_ready
          state_color: true
        title-card-button-overlay: false
        clear: false

@bassdr
Copy link
Contributor

bassdr commented Oct 28, 2024

I would personally move this in a separate file, say doc/LOVELACE.md and refer to it in the README.md. I feel this is not exactly related with this HACS but more with lovelace in general...

@chelming
Copy link
Author

or a wiki page. I don't care either way

#99 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants