Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: custom:mushroom-light-card
- entity: light.nazwa_lampy
- show_brightness_control: true
- show_color_temp_control: true
- show_color_control: true
- use_light_color: true
- icon: none
- card_mod:
- style: |
- mushroom-state-item {
- {% if is_state(config.entity, 'on') %}
- {% set light_level = ((state_attr(config.entity, "brightness") / 255) * 10) | round(0) * 10 %}
- {% if light_level == 100 %}
- {% set light_level = 'on' %}
- {% elif light_level == 0 %}
- {% set light_level = 'off' %}
- {% endif %}
- {% else %}
- {% set light_level = 'off' %}
- {% endif %}
- background: url("/local/lightbulb/lightbulb-{{ light_level }}.svg") no-repeat;
- }
- mushroom-shape-icon {
- --shape-color: none !important;
- --shape-color-disabled: none;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement