Advertisement
Wykop

Oświetlenie

Dec 19th, 2022
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. type: custom:mushroom-light-card
  2. entity: light.nazwa_lampy
  3. show_brightness_control: true
  4. show_color_temp_control: true
  5. show_color_control: true
  6. use_light_color: true
  7. icon: none
  8. card_mod:
  9. style: |
  10. mushroom-state-item {
  11. {% if is_state(config.entity, 'on') %}
  12. {% set light_level = ((state_attr(config.entity, "brightness") / 255) * 10) | round(0) * 10 %}
  13. {% if light_level == 100 %}
  14. {% set light_level = 'on' %}
  15. {% elif light_level == 0 %}
  16. {% set light_level = 'off' %}
  17. {% endif %}
  18. {% else %}
  19. {% set light_level = 'off' %}
  20. {% endif %}
  21. background: url("/local/lightbulb/lightbulb-{{ light_level }}.svg") no-repeat;
  22. }
  23. mushroom-shape-icon {
  24. --shape-color: none !important;
  25. --shape-color-disabled: none;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement