Advertisement
ClusterM

Цветной чайник в Home Assistant

Dec 30th, 2021
1,380
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. type: vertical-stack
  2. cards:
  3.   - type: button
  4.     tap_action:
  5.       action: more-info
  6.     entity: water_heater.kettle_rk_g211s
  7.     show_state: true
  8.     name: Чайник
  9.     card_mod:
  10.       style: |
  11.        ha-state-icon {
  12.           color:
  13.           {% set temp = state_attr("water_heater.kettle_rk_g211s", "current_temperature")|int %}
  14.           hsl(
  15.             {{ 235 + (360 - 235) / (100 - 25) * (temp - 25) }},
  16.             {{ 60 + (100 - 60) / (100 - 25) * (temp - 25) }}%,
  17.             50%
  18.           ) !important;
  19.         }
  20.   - type: entities
  21.     entities:
  22.       - entity: water_heater.kettle_rk_g211s
  23.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement