Advertisement
-Teme-

WDx2 HA dashboard

Feb 9th, 2025
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 7.20 KB | None | 0 0
  1. type: horizontal-stack
  2. cards:
  3.   - type: vertical-stack
  4.     cards:
  5.       - type: horizontal-stack
  6.         cards:
  7.           - type: custom:mushroom-template-card
  8.             primary: Hinta nyt
  9.             secondary: >-
  10.               {{ state_attr ('sensor.nordpool', 'current_price') | float | round
  11.               (3) }} c/kWh
  12.             tap_action:
  13.               action: navigate
  14.               navigation_path: /dashboard-panel/energy
  15.             icon: ""
  16.             icon_color: ""
  17.             card_mod:
  18.               style: |
  19.                ha-card  {
  20.                     {% set e = state_attr ('sensor.nordpool', 'current_price') | float  %}
  21.                         {% if (e | float <= 0 ) %} --card-primary-color:white;--card-secondary-color:white;background-color:green
  22.                         {%  elif (e | int(0) <= 5 ) %} --card-primary-color:lightgreen;--card-secondary-color:lightgreen
  23.                         {%  elif (e | int(0) <= 10 ) %} --card-primary-color:orange;--card-secondary-color:orange
  24.                         {%  elif (e | int(0) <= 15 ) %} --card-primary-color:darkred;--card-secondary-color:darkred
  25.                         {% else %}
  26.                         --card-primary-color:black;--card-secondary-color:black;background-color: red;
  27.                         {% endif %}
  28.                       ;
  29.                 }
  30.           - type: custom:mushroom-template-card
  31.             primary: Seuraava h
  32.             secondary: "{{ states('sensor.electricity_price_next') }} c/kWh"
  33.             icon: |-
  34.               {% set p_next = states("sensor.electricity_price_next") | float %}
  35.               {% set p_now = states("sensor.nordpool") | float %}
  36.               {% if p_next == p_now %}
  37.               mdi:arrow-left-right-bold;
  38.               {% else %}
  39.                 {% if p_next < p_now %}
  40.                   mdi:arrow-down-bold
  41.                 {% else %}
  42.                   mdi:arrow-up-bold
  43.                 {% endif %}
  44.               {% endif %}
  45.             icon_color: |-
  46.               {% set p_next = states("sensor.electricity_price_next") | float %}
  47.               {% set p_now = states("sensor.nordpool") | float %}
  48.               {% if p_next == p_now %}
  49.               white
  50.               {% elif p_next < p_now %}
  51.               green;background-color:black
  52.               {% else %}
  53.               red
  54.               {% endif %}
  55.             tap_action:
  56.               action: navigate
  57.               navigation_path: /dashboard-panel/energy
  58.             card_mod:
  59.               style: |
  60.                ha-card  {
  61.                     {% set e = states("sensor.electricity_price_next") | float  %}
  62.                         {% if (e | float <= 0 ) %} --card-primary-color:white;--card-secondary-color:white;background-color:green
  63.                         {%  elif (e | int(0) <= 5 ) %} --card-primary-color:lightgreen;--card-secondary-color:lightgreen
  64.                         {%  elif (e | int(0) <= 10 ) %} --card-primary-color:orange;--card-secondary-color:orange
  65.                         {%  elif (e | int(0) <= 15 ) %} --card-primary-color:darkred;--card-secondary-color:darkred
  66.                         {% else %}
  67.                         --card-primary-color:black;--card-secondary-color:black;background-color: red;
  68.                         {% endif %}
  69.                       ;
  70.                 }
  71.           - type: custom:mushroom-template-card
  72.             primary: Keskihinta
  73.             secondary: >-
  74.               {{ state_attr ('sensor.nordpool', 'average') | float | round (3)
  75.               }} c/kWh
  76.             icon_color: ""
  77.             icon: ""
  78.             tap_action:
  79.               action: navigate
  80.               navigation_path: /dashboard-panel/energy
  81.             card_mod:
  82.               style: |
  83.                ha-card {
  84.                   {% set state = state_attr ('sensor.nordpool', 'average') | float %}
  85.                   {% if state <  5 %} --card-primary-color:lightgreen;--card-secondary-color: lightgreen;
  86.                   {% elif state <  10 %} --card-primary-color:orange;--card-secondary-color: orange;
  87.                   {% else %} --card-primary-color:red;--card-secondary-color:red;
  88.                   {% endif %}
  89.                 }
  90.       - type: custom:clock-weather-card
  91.         entity: weather.forecast_home
  92.         name: Koti
  93.         sun_entity: sun.sun
  94.         temperature_sensor: sensor.average_outdoor_temperature
  95.         humidity_sensor: sensor.average_outdoor_humidity
  96.         weather_icon_type: fill
  97.         animated_icon: false
  98.         forecast_rows: 4
  99.         locale: fi
  100.         time_pattern: HH:mm
  101.         time_format: 24
  102.         date_pattern: ccc, d.M.yyyy
  103.         hide_today_section: false
  104.         hide_forecast_section: false
  105.         show_humidity: true
  106.         hide_clock: false
  107.         hide_date: false
  108.         hourly_forecast: false
  109.         use_browser_time: false
  110.         time_zone: null
  111.         show_decimal: true
  112.         hold_action:
  113.           action: navigate
  114.           navigation_path: /dashboard-panel/rooms
  115.       - type: horizontal-stack
  116.         cards:
  117.           - type: horizontal-stack
  118.             cards:
  119.               - type: custom:button-card
  120.                 entity: light.hallway_lights
  121.                 name: Aula
  122.                 icon: hue:bulb-group-spot-hung
  123.                 aspect_ratio: 2.5/1
  124.               - type: custom:button-card
  125.                 tap_action:
  126.                   action: navigate
  127.                   navigation_path: /dashboard-panel/rooms
  128.                 name: Huoneet
  129.                 color: rgb(85, 120, 155)
  130.                 icon: mdi:floor-plan
  131.                 aspect_ratio: 2.5/1
  132.               - type: custom:button-card
  133.                 entity: light.balcony_lights
  134.                 name: Terassi
  135.                 aspect_ratio: 2.5/1
  136.   - type: vertical-stack
  137.     cards:
  138.       - type: custom:simple-thermostat
  139.         entity: climate.livingroom_ac
  140.         name: Olohuone ILP
  141.         step_size: 1
  142.         label:
  143.           temperature: ILP lämpö
  144.         hide:
  145.           state: true
  146.         sensors:
  147.           - attribute: fan_mode
  148.             name: Puhallusnopeus
  149.           - entity: sensor.livingroom_average_temperature
  150.             name: Huonelämpö
  151.           - entity: binary_sensor.balcony_blu_door_window
  152.             name: Terassin ovi
  153.           - entity: input_boolean.ac_override
  154.             name: Manuaaliohjaus
  155.           - entity: sensor.fireplace_temperature
  156.             name: Takka lämpötila
  157.           - entity: sensor.mitsu_ac_power
  158.             name: Teho
  159.         layout:
  160.           mode:
  161.             headings: false
  162.             icons: true
  163.             names: true
  164.         control:
  165.           hvac:
  166.             "off":
  167.               name: Sammuta
  168.             heat:
  169.               name: Lämmitys
  170.             cool:
  171.               name: Jäähdytys
  172.             heat_cool: false
  173.             dry:
  174.               name: Kuivatus
  175.             fan_only:
  176.               name: Tuuletus
  177.       - type: horizontal-stack
  178.         cards:
  179.           - type: custom:mushroom-number-card
  180.             entity: input_number.ac_heating_price_plan
  181.             name: Hintaraja
  182.             visibility:
  183.               - condition: state
  184.                 entity: input_boolean.ac_override
  185.                 state: "off"
  186.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement