ฝากติดตามช่องลุงร๊อคด้วยนะครับ

YouTube

Facebook

Requirements

RockuSense Tank Level

fluid-level-background-card @HACS

stack-in-card @HACS

Lovelace Codes

type: custom:fluid-level-background-card
card:
  show_name: true
  show_icon: true
  type: button
  tap_action:
    action: none
  show_state: true
  entity: sensor.name_rks_tank_capacity_percent
  icon: mdi:barrel-outline
  hold_action:
    action: none
  name: TANK CAPACITY
level_color:
  - 33
  - 150
  - 243
entity: sensor.name_rks_tank_capacity_percent

Options

เราสามารถประยุกต์ใช้ Input_Number ในการสร้างขอบเขตการทำงานของปั๊มน้ำ ว่าให้เริ่มทำตอนไหน และให้หยุดตอนไหนได้อีกด้วย โดยการสั่งปั๊มผ่านพวก Smart Plug เช่น Sonoff S31 ที่ทำการติดตั้ง Tasmota / ESPHome เรียบร้อยแล้ว

type: custom:stack-in-card
keep:
  margin: false
  box_shadow: false
  background: false
cards:
  - type: grid
    square: false
    columns: 2
    cards:
      - type: custom:mushroom-template-card
        entity: switch.rkp_s31
        style: |
          ha-card {
            padding-bottom: 14px !important;
          }
        primary: WATER PUMP
        secondary: |-
          {% set mode = states('switch.rkp_s31') %}
          {% if mode == 'off' %}
          OFF
          {% elif mode == 'on' %}
          ON
          {% else %}
          N/A
          {% endif %}
        icon: |-
          {% set mode = states('switch.rkp_s31') %}
          {% if mode == 'off' %}
          mdi:water-pump-off
          {% elif mode == 'on' %}
          mdi:water-pump
          {% else %}
          mdi:crosshairs-question
          {% endif %}
        icon_color: |-
          {% set status = states('switch.rkp_s31') %}
          {% if status == 'off' %}
          red
          {% elif status == 'on' %}
          green
          {% else %}
          grey
          {% endif %}
      - type: custom:mushroom-chips-card
        style: |
          ha-card {
            --chip-box-shadow: none;
            --chip-background: none;
            --chip-spacing: 0px;
            --chip-padding: 0 0.2em
          }
        alignment: justify
        chips:
          - type: entity
            entity: sensor.rkp_s31_energy_voltage
            icon_color: orange
          - type: entity
            entity: sensor.rkp_s31_energy_current
            icon_color: green
          - type: entity
            entity: sensor.rkp_s31_energy_power
            icon: mdi:alpha-p-circle-outline
            icon_color: blue
          - type: entity
            entity: sensor.rkp_s31_energy_today
            icon: mdi:meter-electric-outline
            icon_color: red
  - type: custom:mushroom-number-card
    entity: input_number.name_low_pump
    name: START PUMP
    tap_action:
      action: none
    hold_action:
      action: none
    double_tap_action:
      action: none
    fill_container: false
  - type: custom:mushroom-number-card
    entity: input_number.name_high_pump
    name: STOP PUMP
    tap_action:
      action: none
    hold_action:
      action: none
    double_tap_action:
      action: none
    fill_container: false
    icon_color: green