Advertisement
fablav

Deumidificatore Comfee

Apr 3rd, 2024
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 13.56 KB | Software | 0 0
  1. type: vertical-stack
  2. title: Deumidificatore 💦
  3. cards:
  4.   - type: custom:swipe-card
  5.     cards:
  6.       - type: custom:mini-graph-card
  7.         name: UmiditĂ 
  8.         entities:
  9.           - entity: sensor.umidita_camera
  10.             name: Camera
  11.             show_state: true
  12.             color: red
  13.           - entity: sensor.umidita_soggiorno
  14.             name: Soggiorno
  15.             show_state: true
  16.             color: blue
  17.         unit: '%'
  18.         hour24: true
  19.         show:
  20.           graph: true
  21.           icon: true
  22.           extrema: false
  23.           fill: true
  24.           state: true
  25.           labels: true
  26.         animate: true
  27.         align_state: center
  28.         hours_to_show: 24
  29.         tap_action:
  30.           action: none
  31.       - type: custom:mini-graph-card
  32.         name: Temperature
  33.         entities:
  34.           - entity: sensor.broadlink_rm4_camera_temperature
  35.             name: Camera
  36.             show_state: true
  37.             color: red
  38.           - entity: sensor.broadlink_rm4_soggiorno_temperature
  39.             name: Soggiorno
  40.             show_state: true
  41.             color: blue
  42.         hour24: true
  43.         show:
  44.           graph: true
  45.           icon: true
  46.           extrema: false
  47.           fill: true
  48.           state: true
  49.           labels: true
  50.         animate: true
  51.         align_state: center
  52.         hours_to_show: 24
  53.         tap_action:
  54.           action: none
  55.   - type: entities
  56.     show_header_toggle: false
  57.     entities:
  58.       - entity: humidifier.deumidificatore
  59.         toggle: false
  60.         show_state: false
  61.         type: custom:multiple-entity-row
  62.         name: Impostazioni
  63.         icon: mdi:water-percent
  64.         state_header: Stato
  65.         entities:
  66.           - attribute: humidity
  67.             name: Target
  68.             unit: '%'
  69.           - entity: sensor.deumidificatore_humidity
  70.             name: Attuale
  71.       - entity: sensor.umidita_camera
  72.         toggle: false
  73.         type: custom:multiple-entity-row
  74.         name: Camere
  75.         icon: mdi:water-percent
  76.         state_header: Camera
  77.         entities:
  78.           - entity: sensor.umidita_soggiorno
  79.             name: Soggiorno
  80.       - entity: binary_sensor.deumidificatore_defrosting
  81.         toggle: false
  82.         type: custom:multiple-entity-row
  83.         name: Stato
  84.         icon: mdi:format-list-bulleted-type
  85.         state_header: Defrosting
  86.         entities:
  87.           - entity: sensor.deumidificatore_temperature
  88.             name: Temperature
  89.   - type: horizontal-stack
  90.     cards:
  91.       - type: custom:button-card
  92.         tap_action:
  93.           action: call-service
  94.           service: humidifier.toggle
  95.           service_data:
  96.             entity_id: humidifier.deumidificatore
  97.         entity_id: humidifier.deumidificatore
  98.         entity: humidifier.deumidificatore
  99.         extra_styles: |
  100.          @keyframes bounce {
  101.             0%, 20%, 50%, 80%, 100% { transform: translateX(0); }
  102.             40% { transform: translateX(-15px); }
  103.             60% { transform: translateX(-10px); }
  104.           }
  105.         name: Deumidificatore
  106.         icon: mdi:air-humidifier
  107.         label: Spento
  108.         show_label: true
  109.         show_icon: true
  110.         show_name: false
  111.         styles:
  112.           label:
  113.             - color: white
  114.           icon:
  115.             - color: white
  116.           card:
  117.             - background-color: red
  118.         state:
  119.           - value: 'on'
  120.             icon: mdi:tailwind
  121.             label: Acceso
  122.             styles:
  123.               card:
  124.                 - background-color: limegreen
  125.               label:
  126.                 - color: black
  127.               icon:
  128.                 - icon: mdi:tailwind
  129.                 - color: black
  130.                 - animation: bounce 2s infinite
  131.       - type: custom:button-card
  132.         entity: binary_sensor.deumidificatore_tank_full
  133.         name: Vuoto
  134.         show_icon: true
  135.         show_name: true
  136.         state:
  137.           - value: 'on'
  138.             icon: mdi:beaker-alert
  139.             name: Pieno
  140.             styles:
  141.               card:
  142.                 - background-color: orange
  143.                 - animation: blink 2s infinite
  144.           - operator: default
  145.             icon: mdi:beaker-outline
  146.       - type: custom:button-card
  147.         entity: fan.deumidificatore_fan
  148.         show_icon: true
  149.         show_name: true
  150.         tap_action:
  151.           action: call-service
  152.           service: script.conta_fan_deumidificatore
  153.         state:
  154.           - operator: template
  155.             value: |
  156.              [[[
  157.                return (states['fan.deumidificatore_fan'].attributes.preset_mode === 'High' ) && states['humidifier.deumidificatore'].state === 'on'
  158.               ]]]
  159.             icon: mdi:fan
  160.             name: Turbo
  161.             color: black
  162.             styles:
  163.               name:
  164.                 - color: black
  165.               icon:
  166.                 - animation:
  167.                    - rotating 0.5s linear infinite
  168.               card:
  169.                 - background-color: '#D2D180'
  170.           - operator: template
  171.             value: |
  172.              [[[
  173.                return (states['fan.deumidificatore_fan'].attributes.preset_mode === 'Medium' ) && states['humidifier.deumidificatore'].state === 'on'
  174.               ]]]
  175.             icon: mdi:fan
  176.             name: Medio
  177.             color: black
  178.             styles:
  179.               name:
  180.                 - color: black
  181.               icon:
  182.                 - animation:
  183.                    - rotating 1s linear infinite
  184.               card:
  185.                 - background-color: '#E5E483'
  186.           - operator: template
  187.             value: |
  188.              [[[
  189.                return (states['fan.deumidificatore_fan'].attributes.preset_mode === 'Low' ) && states['humidifier.deumidificatore'].state === 'on'
  190.               ]]]
  191.             icon: mdi:fan
  192.             name: Lento
  193.             color: black
  194.             styles:
  195.               name:
  196.                 - color: black
  197.               icon:
  198.                 - animation:
  199.                    - rotating 2s linear infinite
  200.               card:
  201.                 - background-color: '#F1F5A8'
  202.           - operator: default
  203.             icon: mdi:fan
  204.             color: white
  205.             name: 'Off'
  206.   - type: entities
  207.     show_header_toggle: false
  208.     entities:
  209.       - type: custom:text-divider-row
  210.         text: ModalitĂ 
  211.       - type: custom:paper-buttons-row
  212.         buttons:
  213.           - tap_action:
  214.               action: call-service
  215.               service: humidifier.set_mode
  216.               service_data:
  217.                 entity_id: humidifier.deumidificatore
  218.                 mode: Set
  219.             icon: mdi:water-percent
  220.             layout: icon_name
  221.             name: Target
  222.             style:
  223.               button:
  224.                 background-color: >
  225.                  {% if is_state_attr('humidifier.deumidificatore', 'mode',
  226.                   'Set' ) and  is_state('humidifier.deumidificatore', 'on') %}
  227.                     limegreen
  228.                   {% else%}
  229.                    
  230.                   {% endif %}
  231.                 color: >
  232.                  {% if is_state_attr('humidifier.deumidificatore', 'mode',
  233.                   'Set' ) and  is_state('humidifier.deumidificatore', 'on') %}
  234.                    white
  235.                   {% else%}
  236.                    
  237.                   {% endif %}
  238.                 border-radius: 10px
  239.                 opacity: 1
  240.           - icon: mdi:robot
  241.             tap_action:
  242.               action: call-service
  243.               service: humidifier.set_mode
  244.               service_data:
  245.                 entity_id: humidifier.deumidificatore
  246.                 mode: Smart
  247.             layout: icon_name
  248.             name: Smart
  249.             style:
  250.               button:
  251.                 background-color: >
  252.                  {% if is_state_attr('humidifier.deumidificatore', 'mode',
  253.                   'Smart' ) and  is_state('humidifier.deumidificatore', 'on') %}
  254.                     limegreen
  255.                   {% else%}
  256.                    
  257.                   {% endif %}
  258.                 color: >
  259.                  {% if is_state_attr('humidifier.deumidificatore', 'mode',
  260.                   'Smart' ) and  is_state('humidifier.deumidificatore', 'on') %}
  261.                     white
  262.                   {% else%}
  263.                    
  264.                   {% endif %}
  265.                 border-radius: 10px
  266.                 opacity: 1
  267.           - icon: mdi:autorenew
  268.             name: Continuo
  269.             layout: icon_name
  270.             tap_action:
  271.               action: call-service
  272.               service: humidifier.set_mode
  273.               service_data:
  274.                 entity_id: humidifier.deumidificatore
  275.                 mode: Continuous
  276.             style:
  277.               button:
  278.                 background-color: >
  279.                  {% if is_state_attr('humidifier.deumidificatore', 'mode',
  280.                   'Continuous' ) and  is_state('humidifier.deumidificatore',
  281.                   'on') %}
  282.                     limegreen
  283.                   {% else%}
  284.                    
  285.                   {% endif %}
  286.                 color: >
  287.                  {% if is_state_attr('humidifier.deumidificatore', 'mode',
  288.                   'Continuous' ) and  is_state('humidifier.deumidificatore',
  289.                   'on') %}
  290.                     white
  291.                   {% else%}
  292.                    
  293.                   {% endif %}
  294.                 border-radius: 10px
  295.                 opacity: 1
  296.           - icon: mdi:tshirt-crew
  297.             name: Asciutto
  298.             layout: icon_name
  299.             tap_action:
  300.               action: call-service
  301.               service: humidifier.set_mode
  302.               service_data:
  303.                 entity_id: humidifier.deumidificatore
  304.                 mode: Dry
  305.             style:
  306.               button:
  307.                 background-color: >
  308.                  {% if is_state_attr('humidifier.deumidificatore', 'mode',
  309.                   'Dry' ) and  is_state('humidifier.deumidificatore', 'on') %}
  310.                     limegreen
  311.                   {% else%}
  312.                    
  313.                   {% endif %}
  314.                 color: >
  315.                  {% if is_state_attr('humidifier.deumidificatore', 'mode',
  316.                   'Dry' ) and  is_state('humidifier.deumidificatore', 'on') %}
  317.                     white
  318.                   {% else%}
  319.                    
  320.                   {% endif %}
  321.                 border-radius: 10px
  322.                 opacity: 1
  323.       - type: custom:text-divider-row
  324.         text: Seleziona velocitĂ  ventola
  325.       - type: custom:paper-buttons-row
  326.         buttons:
  327.           - icon: mdi:fan-speed-1
  328.             name: Lento
  329.             layout: icon_name
  330.             tap_action:
  331.               action: call-service
  332.               service: fan.set_preset_mode
  333.               service_data:
  334.                 entity_id: fan.deumidificatore_fan
  335.                 preset_mode: Low
  336.             style:
  337.               button:
  338.                 background-color: >
  339.                  {% if is_state_attr('fan.deumidificatore_fan', 'preset_mode',
  340.                   'Low' ) and  is_state('humidifier.deumidificatore', 'on') %}
  341.                     limegreen
  342.                   {% else%}
  343.                    
  344.                   {% endif %}
  345.                 color: >
  346.                  {% if is_state_attr('fan.deumidificatore_fan', 'preset_mode',
  347.                   'Low' ) and  is_state('humidifier.deumidificatore', 'on') %}
  348.                     white
  349.                   {% else%}
  350.                    
  351.                   {% endif %}
  352.                 border-radius: 10px
  353.                 opacity: 1
  354.           - icon: mdi:fan-speed-2
  355.             name: Medio
  356.             layout: icon_name
  357.             tap_action:
  358.               action: call-service
  359.               service: fan.set_preset_mode
  360.               service_data:
  361.                 entity_id: fan.deumidificatore_fan
  362.                 preset_mode: Medium
  363.             style:
  364.               button:
  365.                 background-color: >
  366.                  {% if is_state_attr('fan.deumidificatore_fan', 'preset_mode',
  367.                   'Medium' ) and  is_state('humidifier.deumidificatore', 'on')
  368.                   %}
  369.                     limegreen
  370.                   {% else%}
  371.                    
  372.                   {% endif %}
  373.                 color: >
  374.                  {% if is_state_attr('fan.deumidificatore_fan', 'preset_mode',
  375.                   'Medium' ) and  is_state('humidifier.deumidificatore', 'on')
  376.                   %}
  377.                     white
  378.                   {% else%}
  379.                    
  380.                   {% endif %}
  381.                 border-radius: 10px
  382.                 opacity: 1
  383.           - icon: mdi:fan-speed-3
  384.             name: Forte
  385.             layout: icon_name
  386.             tap_action:
  387.               action: call-service
  388.               service: fan.set_preset_mode
  389.               service_data:
  390.                 entity_id: fan.deumidificatore_fan
  391.                 preset_mode: High
  392.             style:
  393.               button:
  394.                 background-color: >
  395.                  {% if is_state_attr('fan.deumidificatore_fan', 'preset_mode',
  396.                   'High' ) and  is_state('humidifier.deumidificatore', 'on') %}
  397.                     limegreen
  398.                   {% else%}
  399.                    
  400.                   {% endif %}
  401.                 color: >
  402.                  {% if is_state_attr('fan.deumidificatore_fan', 'preset_mode',
  403.                   'High' ) and  is_state('humidifier.deumidificatore', 'on') %}
  404.                     white
  405.                   {% else%}
  406.                    
  407.                   {% endif %}
  408.                 border-radius: 10px
  409.                 opacity: 1
  410.  
Tags: ha
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement