Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: custom:stack-in-card
- mode: horizontal
- cards:
- - type: custom:mushroom-person-card
- entity: person.person
- use_entity_picture: true
- hide_name: false
- layout: default
- tap_action:
- action: fire-dom-event
- browser_mod:
- command: popup
- deviceID: this
- title: Person
- card:
- type: custom:mod-card
- style: |
- ha-card {
- padding-right: 15px;
- padding-left: 15px;
- padding-bottom: 15px;
- }
- card:
- type: vertical-stack
- cards:
- - type: horizontal-stack
- cards:
- - type: entity
- entities:
- - entity: device_tracker.person_10
- aspect_ratio: '2'
- use_entity_picture: true
- - type: custom:mushroom-chips-card
- style: |
- ha-card {
- --chip-box-shadow: none;
- --chip-background: none;
- --chip-spacing: none;
- --chip-height: 66px
- }
- chips:
- - type: template
- icon_color: |2-
- {% set state=states('sensor.sm_g975f_battery_state') %}
- {% if state=='Charging' %}
- green
- {% elif state=='Not Charging' %}
- black
- {% endif %}
- entity: sensor.sm_g975f_battery_state
- content: '{{ states(entity) }}'
- icon: mdi:power-plug
- tap_action:
- action: more-info
- - type: template
- entity: sensor.sm_g975f_battery_level
- content: '{{ states(entity) }} %'
- icon: |2
- {% set bl = states('sensor.sm_g975f_battery_level') | int %}
- {% if bl < 10 %} mdi:battery-outline
- {% elif bl < 20 %} mdi:battery-10
- {% elif bl < 30 %} mdi:battery-20
- {% elif bl < 40 %} mdi:battery-30
- {% elif bl < 50 %} mdi:battery-40
- {% elif bl < 60 %} mdi:battery-50
- {% elif bl < 70 %} mdi:battery-60
- {% elif bl < 80 %} mdi:battery-70
- {% elif bl < 90 %} mdi:battery-80
- {% elif bl < 100 %} mdi:battery-90
- {% elif bl == 100 %} mdi:battery
- {% else %} mdi:battery-unknown
- {% endif %}
- icon_color: |2-
- {% set bl = states('sensor.sm_g975f_battery_level') | int %}
- {% if bl < 10 %} red
- {% elif bl < 20 %} red
- {% elif bl < 30 %} red
- {% elif bl < 40 %} orange
- {% elif bl < 50 %} orange
- {% elif bl < 60 %} green
- {% elif bl < 70 %} green
- {% elif bl < 80 %} green
- {% elif bl < 90 %} green
- {% elif bl < 100 %} green
- {% elif bl == 100 %} green
- {% else %} grey
- {% endif %}
- tap_action:
- action: more-info
- - type: entity
- icon_color: yellow
- entity: sensor.kroki_person_dzien
- alignment: left
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement