找回密碼
 立即註冊
惟家LINE群QRCODE
    查看: 1711|回覆: 1

    Dyson 面板分享

    [複製鏈接]

    !lvup!   100%

    11

    主題

    6

    回帖

    518

    積分

    超級版主

    積分
    518
    發表於 2022-6-30 17:15:53 | 顯示全部樓層 |閱讀模式
    新增好設備之後可以透過 multiple-entity-row節省版面
    1. 因 auto 氣流方向 擺頭都只有在實體面板才能控制所以需要另外拉出來做成switch
    請依照下面格式去把這三個按鈕拉出來

    switch:
      - platform: template
        switches:
          dyson_auto:
            friendly_name: Dyson HP04 Auto
            value_template: "{{ is_state_attr('fan.pure_hot_cool', 'preset_mode', 'Auto') }}"
            turn_on:
              service: fan.set_preset_mode
              target:
                entity_id: fan.pure_hot_cool
              data:
                preset_mode: Auto
            turn_off:
              service: fan.set_percentage
              target:
                entity_id: fan.pure_hot_cool
              data:
                percentage: 50
            icon_template: >
              {% if is_state('fan.pure_hot_cool', 'on') and is_state_attr('fan.pure_hot_cool', 'preset_mode', true) %}
                mdi:fan-auto
              {% else %}
                mdi:fan-auto
              {% endif %}

      - platform: template
        switches:
          dyson_direction:
            friendly_name: Dyson氣流方向
            value_template: "{{ is_state_attr('fan.pure_hot_cool', 'direction', 'forward') }}"
            turn_on:
              service: fan.set_direction
              target:
                entity_id: fan.pure_hot_cool
              data:
                direction: forward
            turn_off:
              service: fan.set_direction
              target:
                entity_id: fan.pure_hot_cool
              data:
                direction: reverse
            icon_template: >
              {% if is_state('fan.pure_hot_cool', 'on') and is_state_attr('fan.pure_hot_cool', 'direction', true) %}
                mdi:tailwind
              {% else %}
                mdi:tailwind
              {% endif %}

      - platform: template
        switches:
          dyson_oscillation:
            friendly_name: Dyson擺頭
            value_template: "{{ is_state('fan.pure_hot_cool', 'on') and is_state_attr('fan.pure_hot_cool', 'oscillating', true) }}"
            turn_on:
              service: fan.oscillate
              data:
                entity_id: fan.pure_hot_cool
                oscillating: true
            turn_off:
              service: fan.oscillate
              data:
                entity_id: fan.pure_hot_cool
                oscillating: false
            icon_template: >
              {% if is_state('fan.pure_hot_cool', 'on') and is_state_attr('fan.pure_hot_cool', 'oscillating', true) %}
                mdi:sync
              {% else %}
                mdi:sync-off
              {% endif %}


    2. 面板分享 須先在HACS安裝 multiple-entity-row


    type: entities
    entities:
      - entity: fan.pure_hot_cool
      - entity: switch.dyson_auto
        type: custom:multiple-entity-row
        name: 設定
        state_header: 自動
        toggle: true
        entities:
          - entity: switch.dyson_oscillation
            name: 擺頭
            toggle: true
            state_color: true
            tap_action:
              action: toggle
          - entity: switch.pure_hot_cool_continuous_monitoring
            name: 監控
            toggle: true
          - entity: switch.pure_hot_cool_night_mode
            name: 夜間
            toggle: true
          - entity: switch.dyson_direction
            name: 氣流
            toggle: true
      - type: section
      - entity: sensor.pure_hot_cool_pm_2_5
        type: custom:multiple-entity-row
        name: 空氣品質
        state_header: PM2.5
        toggle: false
        entities:
          - entity: sensor.pure_hot_cool_volatile_organic_compounds
            name: VOC
            toggle: false
          - entity: sensor.pure_hot_cool_nitrogen_dioxide
            name: NO2
            toggle: false
          - entity: sensor.pure_hot_cool_pm_10
            name: PM10
            toggle: false
      - type: section
      - entity: sensor.pure_hot_cool_carbon_filter_life
        type: custom:multiple-entity-row
        name: 濾網
        state_header: 碳濾網
        toggle: false
        entities:
          - entity: sensor.pure_hot_cool_hepa_filter_life
            name: HEPA濾網
            toggle: false
      - type: section
      - entity: sensor.pure_hot_cool_temperature
        type: custom:multiple-entity-row
        name: 環境狀態
        state_header: 溫度
        toggle: false
        entities:
          - entity: sensor.pure_hot_cool_humidity
            name: 濕度
            toggle: false
    show_header_toggle: false
    title: Dyson HP04




    !lvup!   100%

    11

    主題

    6

    回帖

    518

    積分

    超級版主

    積分
    518
     樓主| 發表於 2022-6-30 18:11:40 | 顯示全部樓層
    dyson HP系列溫度升高降低用scripts 可配合無線按鈕去調整溫度

    script:
      dyson_heat_up:
        alias: Dyson 溫度升
        sequence:
        - service: climate.set_temperature
          data_template:
            entity_id: climate.pure_hot_cool
            temperature: "{{(state_attr('climate.pure_hot_cool' , 'temperature')|round(0)) + 1 }}"
      dyson_heat_down:
        alias: Dyson 溫度降
        sequence:
        - service: climate.set_temperature
          data_template:
            entity_id: climate.pure_hot_cool
            temperature: "{{(state_attr('climate.pure_hot_cool' , 'temperature')|round(0)) - 1 }}"
    您需要登入後纔可以回帖 登入 | 立即註冊

    本版積分規則

    Archiver|手機版|惟家的智能論壇

    GMT+8, 2026-9-24 12:21 , Processed in 0.083774 second(s), 24 queries .

    快速回覆 返回頂部 返回列表