jimz011 / homekit-infused

Homekit Infused 5 2023
https://jimz011.github.io/homekit-infused/
Other
873 stars 137 forks source link

Idea to make code short #3

Closed kraineff closed 5 years ago

kraineff commented 5 years ago

You can change a long currently-on code with this:

- type: custom:decluttering-card
        template: header_text
        variables:
          - content: '##### Currently On'
      - type: horizontal-stack
        cards:
          - !include ../decluttering_templates/blank-card.yaml
          - type: 'custom:monster-card'
            card:
              type: glance
              columns: 3
              show_empty: true
              style: |
                ha-card {
                  border-radius: 12px;
                  background: var(--homekit-white);
                  font-size: 12px;
                  font-family: Helvetica;
                }
            filter:
              include:
                - state: 'on'
              exclude:
                - entity_id: '*tools_*'
                - entity_id: 'switch.bra_right_bedroom'
                - domain: automation
                - domain: group
          - !include ../decluttering_templates/blank-card.yaml
jimz011 commented 5 years ago

Thank you, very nice addition indeed. Will be added in 0.12.0 which will be released sunday or monday. Thanks again!

jimz011 commented 5 years ago

An addition to my thanks to you. I use the auto-entities-card instead of the monster-card. The config you sent me works perfectly fine with this card. (it has some differences to the monster-card).

Differences Auto-Entities vs Monster-Card:

Thanks again, I have pushed this to the upcoming release of my Lovelace config. I will thank you properly in the change notes!

kraineff commented 5 years ago

Oh cool!!