Frizzlife smart water monitor

Thank You, Downloaded the Apexcard and added following to Configuration.yaml. Added the Yaml you posted above to dashboard but looks like my Apex charts aren’t loading not sure why, Can you please help me with that ?

resources:

  • url: /local/apexcharts-card.js?v=2.2.0
    type: module

Never mind, its working fine now. Thanks.

Actually, it looks like it is working but your thresholds aren’t set up correctly (I see the temp graph shows red):
Also noticed you have gal/hr - the numbers on your image look like gpm (i.e. 1.0 to 4.0 gpm)

You will need to convert my Volume numbers from L to gal (i.e L/3.78), Flow numbers L/h to gpm (i.e. Lph / 0.264) and Temp numbers C to F (i.e. (C * 9/5) + 32).

Example:
Current Flow Rate:
color_threshold:
- value: 0.26
color: steelblue
- value: 0.88
color: midnightblue
- value: 1.3
color: green
- value: 2.2
color: green
- value: 3.1
color: orange
- value: 5.3
color: orangered
- value: 6.2
color: red

Got it I played with it a little more and seems like its working now. Good catch on GPH to GPM, I fixed that. Thanks a lot for your help.

I managed to find a way to set the configuration options. It’s pretty ugly and hopefully I can find a better way. I confirmed making a change to these configuration settings in HA is reflected immediately in the SmartLife app and visa-versa - however I haven’t tested every value/string I entered. I’ve had some wine so… :slight_smile:

When I made my changes and reloaded the frizzlife device file, I deleted the Sensor entities to clean up the display; as they became unavailable when they moved to a Configution section. My next step is to add these to the dashboard I was building.

Here is what I did:
Example for the AUTO/ADVANCED_SETTING Protection mode setting:

  - entity: select
    name: Protection Mode
    category: config
    dps:
      - id: 109
        type: string
        name: option
        mapping:
          - dps_val: "AUTO"
            value: "Auto"
          - dps-val: "ADVANCED_SETTING"
            value: "Advanced"

And here’s how I set the AUTO mode and ADVANCED_SETTING mode:

  - entity: select
    name: AUTO mode
    category: config
    dps:
      - id: 110
        type: string
        name: option
        mapping:
          - dps_val: "mode1"
            value: "Mode 1"
          - dps_val: "mode2"
            value: "Mode 2"
          - dps_val: "mode3"
            value: "Mode 3"
  - entity: select
    name: ADVANCED mode
    category: config
    dps:
      - id: 111
        type: string
        name: option
        mapping:
          - dps_val: "mode4"
            value: "Mode 4"
          - dps_val: "mode5"
            value: "Mode 5"
          - dps_val: "mode6"
            value: "Mode 6"
  

Here’s what I used for Advanced Mode Time value:
You will need to modify the name and ID to support the Mode5 and Mode6 entities

  - entity: select
    name: Mode4 Allowed Flow Time
    category: config
    dps:
      - id: 112
        type: integer
        unit: hr
        name: option
        mapping:
          - dps_val: 3
            value: "0.3"
          - dps_val: 4
            value: "0.4"
          - dps_val: 5
            value: "0.5"
          - dps_val: 6
            value: "0.6"
          - dps_val: 7
            value: "0.7"
          - dps_val: 8
            value: "0.8"
          - dps_val: 9
            value: "0.9"
          - dps_val: 10
            value: "1.0"
          - dps_val: 11
            value: "1.1"
          - dps_val: 12
            value: "1.2"
          - dps_val: 13
            value: "1.3"
          - dps_val: 14
            value: "1.4"
          - dps_val: 15
            value: "1.5"
          - dps_val: 16
            value: "1.6"
          - dps_val: 17
            value: "1.7"
          - dps_val: 18
            value: "1.8"
          - dps_val: 19
            value: "1.9"
          - dps_val: 20
            value: "2.0"
          - dps_val: 21
            value: "2.1"
          - dps_val: 22
            value: "2.2"
          - dps_val: 23
            value: "2.3"
          - dps_val: 24
            value: "2.4"
          - dps_val: 25
            value: "2.5"
          - dps_val: 26
            value: "2.6"
          - dps_val: 27
            value: "2.7"
          - dps_val: 28
            value: "2.8"
          - dps_val: 29
            value: "2.9"
          - dps_val: 30
            value: "3.0"

And here’s a sample for setting the Advanced Mode Volume value (IMPORTANT: You will need to change the values from Liters to Gallons (check the SmartLife app for the string values - you’ll need to use diagnostics to see what the integer values are)

You will also need to modify the name and ID to support Mode5 and Mode6 entities:

  - entity: select
    name: Mode4 Allowed Flow Volume
    category: config
    dps:
      - id: 115
        type: integer
        unit: L
        name: option
        mapping:
          - dps_val: 0
            value: "50"
          - dps_val: 1
            value: "100"
          - dps_val: 2
            value: "200"
          - dps_val: 3
            value: "300"
          - dps_val: 4
            value: "400"
          - dps_val: 5
            value: "500"
          - dps_val: 6
            value: "600"
          - dps_val: 7
            value: "700"
          - dps_val: 8
            value: "800"
          - dps_val: 9
            value: "900"
          - dps_val: 10
            value: "1000"
          - dps_val: 11
            value: "1100"
          - dps_val: 12
            value: "1200"
          - dps_val: 13
            value: "1300"
          - dps_val: 14
            value: "1400"
          - dps_val: 15
            value: "1500"
          - dps_val: 16
            value: "1600"
          - dps_val: 17
            value: "1700"
          - dps_val: 18
            value: "1800"
          - dps_val: 19
            value: "1900"
          - dps_val: 20
            value: "2000"
          - dps_val: 25
            value: "2500"
          - dps_val: 30
            value: "3000"
          - dps_val: 35
            value: "3500"
          - dps_val: 40
            value: "4000"
          - dps_val: 45
            value: "4500"
          - dps_val: 50
            value: "5000"

And here’s how it looks on the Tuya_Local device page:

EDIT: Oops - missed the Allowed Min. Flow Rate. As above, my values are for L/hr so you will need to do a conversion to gpm:

  - entity: select
    name: Allowed Min. Flow Rate
    category: config
    dps:
      - id: 119
        type: string
        name: option
        unit: L/h
        mapping:
          - dps_val: 0
            value: "2.5"
          - dps_val: 1
            value: "5"
          - dps_val: 2
            value: "7.5"
          - dps_val: 3
            value: "10"
          - dps_val: 4
            value: "12.5"
          - dps_val: 5
            value: "15"
          - dps_val: 6
            value: "17.5"
          - dps_val: 7
            value: "20.0"
          - dps_val: 8
            value: "22.5"
          - dps_val: 9
            value: "25.0"

1 Like

@grimmt massive thank you! Appreciate all you’ve done here - made my water monitor so much more useful in HA.

I was able to pull all the DPS details from the developer platform in Tuya


{
  "result": {
    "properties": [
      {
        "code": "switch",
        "dp_id": 1,
        "type": "bool",
        "value": true
      },
      {
        "code": "sensor_temperature",
        "dp_id": 12,
        "type": "value",
      },
      {
        "code": "pressure_value",
        "dp_id": 15,
        "type": "value",
      },
      {
        "code": "temp_unit_convert",
        "dp_id": 20,
        "type": "enum",
        "value": "c"
      },
      {
        "code": "fault",
        "dp_id": 24,
        "type": "bitmap",
      },
---	
{
  "label": [
    "powerFailureE0",
    "emptyPipeFailureE1",
    "waterBackflowFailureE2",
    "overrangeFailureE3",
    "waterTemperatureFailureE4",
    "hardwareFailureE5",
    "ValveStuckFailureE6"
  ],
  "maxlen": 7
}
---
      {
        "code": "leak_state",
        "dp_id": 101,
        "type": "bool",
      },
      {
        "code": "measure_unit",
        "dp_id": 102,
        "type": "enum",
        "value": "metric_unit"
      },
      {
        "code": "water_used_today",
        "dp_id": 103,
        "time": 1755987457858,
        "type": "value",
      },
      {
        "code": "water_used_yesterday",
        "dp_id": 104,
        "type": "value",
      },
      {
        "code": "flow_rate",
        "dp_id": 105,
        "type": "value",
      },
      {
        "code": "leak_warn",
        "dp_id": 106,
        "type": "bool",
      },
      {
        "code": "leak_alarm",
        "dp_id": 107,
        "type": "bool",
      },
      {
        "code": "alarm_claer",
        "dp_id": 108,
        "type": "bool",
      },
      {
        "code": "mode_group",
        "dp_id": 109,
        "type": "enum",
        "value": "AUTO"
      },
      {
        "code": "smart_mode",
        "dp_id": 110,
        "type": "enum",
      },
      {
        "code": "pro_mode",
        "dp_id": 111,
        "type": "enum",
      },
      {
        "code": "mode4_time",
        "dp_id": 112,
        "type": "value",
      },
      {
        "code": "mode5_time",
        "dp_id": 113,
        "type": "value",
      },
      {
        "code": "mode6_time",
        "dp_id": 114,
        "type": "value",
      },
      {
        "code": "mode4_flow",
        "dp_id": 115,
        "type": "enum",
      },
      {
        "code": "mode5_flow",
        "dp_id": 116,
        "type": "enum",
      },
      {
        "code": "mode6_flow",
        "dp_id": 117,
        "type": "enum",
      },
      {
        "code": "min_wat_flow_switch",
        "dp_id": 118,
        "type": "bool",
      },
      {
        "code": "min_wat_flow_value",
        "dp_id": 119,
        "type": "enum",
      },
      {
        "code": "equ_reset",
        "dp_id": 120,
        "type": "bool",
      },
      {
        "code": "leak_time",
        "dp_id": 121,
        "type": "value",
      },
      {
        "code": "leak_flow",
        "dp_id": 122,
        "type": "value",
      },
      {
        "code": "leak_warn_time",
        "dp_id": 123,
        "type": "value",
      },
      {
        "code": "leak_warn_flow",
        "dp_id": 124,
        "type": "value",
      },
      {
        "code": "start_testing",
        "dp_id": 125,
        "type": "enum",
      },
      {
        "code": "test_remaining_time",
        "dp_id": 127,
        "type": "value",
      }
    ]
  },

Very nice @Hum00 - what Dev option did you use to get that information from tuya.com?

When I used Get Device Specification Attributes I only received information for DP_ID 1,20,12,15 and 20; and the information I received was formatted differently.

I’m guessing I set something up incorrectly or used the wrong option to retrieve information.

API Explorer > Device Control > Query Properties

I did notice that some of it is wrong, somehow… 104 is definitely not “water_used_yesterday” - you had it right in your version. It was cool to learn the leak_warn and leak_alarm items as well.

A note - HA didn’t like the units for flow rate (it needs L/h, instead of L/hr) and the Volume Today (103) needs to be class: total_increasing and unit: L - to be used properly with the energy section for water tracking.

Also - somehow the product id changed, so it wasn’t auto-detecting it properly. Updated that as well. It still won’t pick it up locally and match config, but using cloud retrieval it does via product id…

Pasting my YAML config I ended up with (I stripped some sensors I didn’t see a point in):

name: Smart Water Meter
products:
  - id: g4sr2q7gaahnm28c
    manufacturer: Frizzlife
    model: LP365P
entities:
  - entity: valve
    class: water
    dps:
      - id: 1
        type: boolean
        name: valve
  - entity: sensor
    class: temperature
    dps:
      - id: 12
        type: integer
        name: sensor
        unit: C
        class: measurement
        mapping:
          - scale: 10.0
        range:
          min: 0
          max: 2120
  - entity: sensor
    class: pressure
    dps:
      - id: 15
        type: integer
        name: sensor
        unit: psi
        class: measurement
        mapping:
          - scale: 10.0
        range:
          min: 0
          max: 99999
  - entity: switch
    name: Protection Enabled
    dps:
      - id: 101
        type: boolean
        name: switch
  - entity: sensor
    class: water
    name: Volume Today
    dps:
      - id: 103
        type: integer
        optional: true
        name: sensor
        class: total_increasing
        unit: L
        mapping:
          - scale: 10.0
  - entity: sensor
    class: volume_flow_rate
    name: Flow Rate per Hour
    dps:
      - id: 104
        type: integer
        optional: true
        name: sensor
        class: measurement
        unit: L/h
        mapping:
          - scale: 1
  - entity: sensor
    class: volume_flow_rate
    name: Current Flow Rate
    dps:
      - id: 105
        type: integer
        name: sensor
        class: measurement
        unit: L/h
        mapping:
          - scale: 1000.0
  - entity: sensor
    name: Leak Warning
    dps:
      - id: 106
        type: boolean
        name: sensor
  - entity: sensor
    name: Leak Alarm
    dps:
      - id: 107
        type: boolean
        name: sensor
  - entity: sensor
    name: Alarm Clear
    dps:
      - id: 108
        type: boolean
        name: sensor
  - entity: select
    name: Protection Mode
    category: config
    dps:
      - id: 109
        type: string
        name: option
        mapping:
          - dps_val: "AUTO"
            value: "Auto"
          - dps-val: "ADVANCED_SETTING"
            value: "Advanced"
  - entity: select
    name: AUTO mode
    category: config
    dps:
      - id: 110
        type: string
        name: option
        mapping:
          - dps_val: "mode1"
            value: "Mode 1"
          - dps_val: "mode2"
            value: "Mode 2"
          - dps_val: "mode3"
            value: "Mode 3"
  - entity: select
    name: ADVANCED mode
    category: config
    dps:
      - id: 111
        type: string
        name: option
        mapping:
          - dps_val: "mode4"
            value: "Mode 4"
          - dps_val: "mode5"
            value: "Mode 5"
          - dps_val: "mode6"
            value: "Mode 6"
  - entity: select
    name: Mode4 Allowed Flow Time
    category: config
    dps:
      - id: 112
        type: integer
        unit: hr
        name: option
        mapping:
          - dps_val: 3
            value: "0.3"
          - dps_val: 4
            value: "0.4"
          - dps_val: 5
            value: "0.5"
          - dps_val: 6
            value: "0.6"
          - dps_val: 7
            value: "0.7"
          - dps_val: 8
            value: "0.8"
          - dps_val: 9
            value: "0.9"
          - dps_val: 10
            value: "1.0"
          - dps_val: 11
            value: "1.1"
          - dps_val: 12
            value: "1.2"
          - dps_val: 13
            value: "1.3"
          - dps_val: 14
            value: "1.4"
          - dps_val: 15
            value: "1.5"
          - dps_val: 16
            value: "1.6"
          - dps_val: 17
            value: "1.7"
          - dps_val: 18
            value: "1.8"
          - dps_val: 19
            value: "1.9"
          - dps_val: 20
            value: "2.0"
          - dps_val: 21
            value: "2.1"
          - dps_val: 22
            value: "2.2"
          - dps_val: 23
            value: "2.3"
          - dps_val: 24
            value: "2.4"
          - dps_val: 25
            value: "2.5"
          - dps_val: 26
            value: "2.6"
          - dps_val: 27
            value: "2.7"
          - dps_val: 28
            value: "2.8"
          - dps_val: 29
            value: "2.9"
          - dps_val: 30
            value: "3.0"
  - entity: select
    name: Mode4 Allowed Flow Volume
    category: config
    dps:
      - id: 115
        type: integer
        unit: L
        name: option
        mapping:
          - dps_val: 0
            value: "50"
          - dps_val: 1
            value: "100"
          - dps_val: 2
            value: "200"
          - dps_val: 3
            value: "300"
          - dps_val: 4
            value: "400"
          - dps_val: 5
            value: "500"
          - dps_val: 6
            value: "600"
          - dps_val: 7
            value: "700"
          - dps_val: 8
            value: "800"
          - dps_val: 9
            value: "900"
          - dps_val: 10
            value: "1000"
          - dps_val: 11
            value: "1100"
          - dps_val: 12
            value: "1200"
          - dps_val: 13
            value: "1300"
          - dps_val: 14
            value: "1400"
          - dps_val: 15
            value: "1500"
          - dps_val: 16
            value: "1600"
          - dps_val: 17
            value: "1700"
          - dps_val: 18
            value: "1800"
          - dps_val: 19
            value: "1900"
          - dps_val: 20
            value: "2000"
          - dps_val: 25
            value: "2500"
          - dps_val: 30
            value: "3000"
          - dps_val: 35
            value: "3500"
          - dps_val: 40
            value: "4000"
          - dps_val: 45
            value: "4500"
          - dps_val: 50
            value: "5000"
  - entity: select
    name: Mode5 Allowed Flow Time
    category: config
    dps:
      - id: 113
        type: integer
        unit: hr
        name: option
        mapping:
          - dps_val: 3
            value: "0.3"
          - dps_val: 4
            value: "0.4"
          - dps_val: 5
            value: "0.5"
          - dps_val: 6
            value: "0.6"
          - dps_val: 7
            value: "0.7"
          - dps_val: 8
            value: "0.8"
          - dps_val: 9
            value: "0.9"
          - dps_val: 10
            value: "1.0"
          - dps_val: 11
            value: "1.1"
          - dps_val: 12
            value: "1.2"
          - dps_val: 13
            value: "1.3"
          - dps_val: 14
            value: "1.4"
          - dps_val: 15
            value: "1.5"
          - dps_val: 16
            value: "1.6"
          - dps_val: 17
            value: "1.7"
          - dps_val: 18
            value: "1.8"
          - dps_val: 19
            value: "1.9"
          - dps_val: 20
            value: "2.0"
          - dps_val: 21
            value: "2.1"
          - dps_val: 22
            value: "2.2"
          - dps_val: 23
            value: "2.3"
          - dps_val: 24
            value: "2.4"
          - dps_val: 25
            value: "2.5"
          - dps_val: 26
            value: "2.6"
          - dps_val: 27
            value: "2.7"
          - dps_val: 28
            value: "2.8"
          - dps_val: 29
            value: "2.9"
          - dps_val: 30
            value: "3.0"
  - entity: select
    name: Mode5 Allowed Flow Volume
    category: config
    dps:
      - id: 116
        type: integer
        unit: L
        name: option
        mapping:
          - dps_val: 0
            value: "50"
          - dps_val: 1
            value: "100"
          - dps_val: 2
            value: "200"
          - dps_val: 3
            value: "300"
          - dps_val: 4
            value: "400"
          - dps_val: 5
            value: "500"
          - dps_val: 6
            value: "600"
          - dps_val: 7
            value: "700"
          - dps_val: 8
            value: "800"
          - dps_val: 9
            value: "900"
          - dps_val: 10
            value: "1000"
          - dps_val: 11
            value: "1100"
          - dps_val: 12
            value: "1200"
          - dps_val: 13
            value: "1300"
          - dps_val: 14
            value: "1400"
          - dps_val: 15
            value: "1500"
          - dps_val: 16
            value: "1600"
          - dps_val: 17
            value: "1700"
          - dps_val: 18
            value: "1800"
          - dps_val: 19
            value: "1900"
          - dps_val: 20
            value: "2000"
          - dps_val: 25
            value: "2500"
          - dps_val: 30
            value: "3000"
          - dps_val: 35
            value: "3500"
          - dps_val: 40
            value: "4000"
          - dps_val: 45
            value: "4500"
          - dps_val: 50
            value: "5000"
  - entity: select
    name: Mode6 Allowed Flow Time
    category: config
    dps:
      - id: 114
        type: integer
        unit: hr
        name: option
        mapping:
          - dps_val: 3
            value: "0.3"
          - dps_val: 4
            value: "0.4"
          - dps_val: 5
            value: "0.5"
          - dps_val: 6
            value: "0.6"
          - dps_val: 7
            value: "0.7"
          - dps_val: 8
            value: "0.8"
          - dps_val: 9
            value: "0.9"
          - dps_val: 10
            value: "1.0"
          - dps_val: 11
            value: "1.1"
          - dps_val: 12
            value: "1.2"
          - dps_val: 13
            value: "1.3"
          - dps_val: 14
            value: "1.4"
          - dps_val: 15
            value: "1.5"
          - dps_val: 16
            value: "1.6"
          - dps_val: 17
            value: "1.7"
          - dps_val: 18
            value: "1.8"
          - dps_val: 19
            value: "1.9"
          - dps_val: 20
            value: "2.0"
          - dps_val: 21
            value: "2.1"
          - dps_val: 22
            value: "2.2"
          - dps_val: 23
            value: "2.3"
          - dps_val: 24
            value: "2.4"
          - dps_val: 25
            value: "2.5"
          - dps_val: 26
            value: "2.6"
          - dps_val: 27
            value: "2.7"
          - dps_val: 28
            value: "2.8"
          - dps_val: 29
            value: "2.9"
          - dps_val: 30
            value: "3.0"
  - entity: select
    name: Mode6 Allowed Flow Volume
    category: config
    dps:
      - id: 117
        type: integer
        unit: L
        name: option
        mapping:
          - dps_val: 0
            value: "50"
          - dps_val: 1
            value: "100"
          - dps_val: 2
            value: "200"
          - dps_val: 3
            value: "300"
          - dps_val: 4
            value: "400"
          - dps_val: 5
            value: "500"
          - dps_val: 6
            value: "600"
          - dps_val: 7
            value: "700"
          - dps_val: 8
            value: "800"
          - dps_val: 9
            value: "900"
          - dps_val: 10
            value: "1000"
          - dps_val: 11
            value: "1100"
          - dps_val: 12
            value: "1200"
          - dps_val: 13
            value: "1300"
          - dps_val: 14
            value: "1400"
          - dps_val: 15
            value: "1500"
          - dps_val: 16
            value: "1600"
          - dps_val: 17
            value: "1700"
          - dps_val: 18
            value: "1800"
          - dps_val: 19
            value: "1900"
          - dps_val: 20
            value: "2000"
          - dps_val: 25
            value: "2500"
          - dps_val: 30
            value: "3000"
          - dps_val: 35
            value: "3500"
          - dps_val: 40
            value: "4000"
          - dps_val: 45
            value: "4500"
          - dps_val: 50
            value: "5000"
  - entity: switch
    name: Allow Min. Flow
    dps:
      - id: 118
        type: boolean
        name: switch
  - entity: select
    name: Allowed Min. Flow Rate
    category: config
    dps:
      - id: 119
        type: string
        name: option
        unit: L/h
        mapping:
          - dps_val: 0
            value: "2.5"
          - dps_val: 1
            value: "5"
          - dps_val: 2
            value: "7.5"
          - dps_val: 3
            value: "10"
          - dps_val: 4
            value: "12.5"
          - dps_val: 5
            value: "15"
          - dps_val: 6
            value: "17.5"
          - dps_val: 7
            value: "20.0"
          - dps_val: 8
            value: "22.5"
          - dps_val: 9
            value: "25.0"

Great thanks for that - I missed the Query Properties option on tuya.com.

So the device ID is unique for each device - I’m guessing that is why it’s called “virtual”. Interesting and important point for anyone attempting to set this up. You have to use the cloud retrieval to obtain the virtual device ID.

I had noticed the L/hr and L units issues when reviewing home-assistant.log and updated my version but didn’t know about the class: total_increasing impact ← I have now updated my version with this and also added leak warn/alarm sensors.

FYI: For the unknown items, I simply commented the lines out so they are there if someone finds out what they are for in the future.

Here is my updated version (for now):

name: Smart Water Meter
products:
  - id: eb0a8e6c88ec94012fduxa
    manufacturer: Frizzlife
    model: LP365P
entities:
#
# SENSORS
#
  - entity: valve
    class: water
    dps:
      - id: 1
        type: boolean
        name: valve
  - entity: sensor
    class: temperature
    dps:
      - id: 12
        type: integer
        name: sensor
        unit: C
        class: measurement
        mapping:
          - scale: 10.0
        range:
          min: 0
          max: 2120
  - entity: sensor
    class: pressure
    dps:
      - id: 15
        type: integer
        name: sensor
        unit: psi
        class: measurement
        mapping:
          - scale: 10.0
        range:
          min: 0
          max: 99999
  - entity: switch
    name: Protection Enabled
    dps:
      - id: 101
        type: boolean
        name: switch
  - entity: sensor
    name: Volume Today
    dps:
      - id: 103
        type: integer
        optional: true
        name: sensor
        class: total_increasing
        unit: L
        mapping:
          - scale: 10.0
  - entity: sensor
    class: volume_flow_rate
    name: Flow Rate per Hour
    dps:
      - id: 104
        type: integer
        optional: true
        name: sensor
        class: measurement
        unit: L/h
        mapping:
          - scale: 1
  - entity: sensor
    class: volume_flow_rate
    name: Current Flow Rate
    dps:
      - id: 105
        type: integer
        name: sensor
        class: measurement
        unit: L/h
        mapping:
          - scale: 1000.0
  - entity: sensor
    name: Leak Warning
    dps:
      - id: 106
        type: boolean
        name: sensor
  - entity: sensor
    name: Leak Alarm
    dps:
      - id: 107
        type: boolean
        name: sensor
  - entity: button
    name: Alarm Clear
    dps:
      - id: 108
        type: boolean
        name: button
#
# CONFIGURATIONS
#
  - entity: select
    name: Protection Mode
    category: config
    dps:
      - id: 109
        type: string
        name: option
        mapping:
          - dps_val: "AUTO"
            value: "Auto"
          - dps-val: "ADVANCED_SETTING"
            value: "Advanced"
  - entity: select
    name: "AUTO Mode #"
    category: config
    dps:
      - id: 110
        type: string
        name: option
        mapping:
          - dps_val: "mode1"
            value: "Mode 1"
          - dps_val: "mode2"
            value: "Mode 2"
          - dps_val: "mode3"
            value: "Mode 3"
  - entity: select
    name: "ADVANCED Mode #"
    category: config
    dps:
      - id: 111
        type: string
        name: option
        mapping:
          - dps_val: "mode4"
            value: "Mode 4"
          - dps_val: "mode5"
            value: "Mode 5"
          - dps_val: "mode6"
            value: "Mode 6"
  - entity: select
    name: Mode4 Allowed Flow Time
    category: config
    dps:
      - id: 112
        type: integer
        unit: hr
        name: option
        mapping:
          - dps_val: 3
            value: "0.3"
          - dps_val: 4
            value: "0.4"
          - dps_val: 5
            value: "0.5"
          - dps_val: 6
            value: "0.6"
          - dps_val: 7
            value: "0.7"
          - dps_val: 8
            value: "0.8"
          - dps_val: 9
            value: "0.9"
          - dps_val: 10
            value: "1.0"
          - dps_val: 11
            value: "1.1"
          - dps_val: 12
            value: "1.2"
          - dps_val: 13
            value: "1.3"
          - dps_val: 14
            value: "1.4"
          - dps_val: 15
            value: "1.5"
          - dps_val: 16
            value: "1.6"
          - dps_val: 17
            value: "1.7"
          - dps_val: 18
            value: "1.8"
          - dps_val: 19
            value: "1.9"
          - dps_val: 20
            value: "2.0"
          - dps_val: 21
            value: "2.1"
          - dps_val: 22
            value: "2.2"
          - dps_val: 23
            value: "2.3"
          - dps_val: 24
            value: "2.4"
          - dps_val: 25
            value: "2.5"
          - dps_val: 26
            value: "2.6"
          - dps_val: 27
            value: "2.7"
          - dps_val: 28
            value: "2.8"
          - dps_val: 29
            value: "2.9"
          - dps_val: 30
            value: "3.0"
  - entity: select
    name: Mode4 Allowed Flow Volume
    category: config
    dps:
      - id: 115
        type: integer
        unit: L
        name: option
        mapping:
          - dps_val: 0
            value: "50"
          - dps_val: 1
            value: "100"
          - dps_val: 2
            value: "200"
          - dps_val: 3
            value: "300"
          - dps_val: 4
            value: "400"
          - dps_val: 5
            value: "500"
          - dps_val: 6
            value: "600"
          - dps_val: 7
            value: "700"
          - dps_val: 8
            value: "800"
          - dps_val: 9
            value: "900"
          - dps_val: 10
            value: "1000"
          - dps_val: 11
            value: "1100"
          - dps_val: 12
            value: "1200"
          - dps_val: 13
            value: "1300"
          - dps_val: 14
            value: "1400"
          - dps_val: 15
            value: "1500"
          - dps_val: 16
            value: "1600"
          - dps_val: 17
            value: "1700"
          - dps_val: 18
            value: "1800"
          - dps_val: 19
            value: "1900"
          - dps_val: 20
            value: "2000"
          - dps_val: 25
            value: "2500"
          - dps_val: 30
            value: "3000"
          - dps_val: 35
            value: "3500"
          - dps_val: 40
            value: "4000"
          - dps_val: 45
            value: "4500"
          - dps_val: 50
            value: "5000"
  - entity: select
    name: Mode5 Allowed Flow Time
    category: config
    dps:
      - id: 113
        type: integer
        unit: hr
        name: option
        mapping:
          - dps_val: 3
            value: "0.3"
          - dps_val: 4
            value: "0.4"
          - dps_val: 5
            value: "0.5"
          - dps_val: 6
            value: "0.6"
          - dps_val: 7
            value: "0.7"
          - dps_val: 8
            value: "0.8"
          - dps_val: 9
            value: "0.9"
          - dps_val: 10
            value: "1.0"
          - dps_val: 11
            value: "1.1"
          - dps_val: 12
            value: "1.2"
          - dps_val: 13
            value: "1.3"
          - dps_val: 14
            value: "1.4"
          - dps_val: 15
            value: "1.5"
          - dps_val: 16
            value: "1.6"
          - dps_val: 17
            value: "1.7"
          - dps_val: 18
            value: "1.8"
          - dps_val: 19
            value: "1.9"
          - dps_val: 20
            value: "2.0"
          - dps_val: 21
            value: "2.1"
          - dps_val: 22
            value: "2.2"
          - dps_val: 23
            value: "2.3"
          - dps_val: 24
            value: "2.4"
          - dps_val: 25
            value: "2.5"
          - dps_val: 26
            value: "2.6"
          - dps_val: 27
            value: "2.7"
          - dps_val: 28
            value: "2.8"
          - dps_val: 29
            value: "2.9"
          - dps_val: 30
  - entity: select
    name: Mode5 Allowed Flow Volume
    category: config
    dps:
      - id: 116
        type: integer
        unit: L
        name: option
        mapping:
          - dps_val: 0
            value: "50"
          - dps_val: 1
            value: "100"
          - dps_val: 2
            value: "200"
          - dps_val: 3
            value: "300"
          - dps_val: 4
            value: "400"
          - dps_val: 5
            value: "500"
          - dps_val: 6
            value: "600"
          - dps_val: 7
            value: "700"
          - dps_val: 8
            value: "800"
          - dps_val: 9
            value: "900"
          - dps_val: 10
            value: "1000"
          - dps_val: 11
            value: "1100"
          - dps_val: 12
            value: "1200"
          - dps_val: 13
            value: "1300"
          - dps_val: 14
            value: "1400"
          - dps_val: 15
            value: "1500"
          - dps_val: 16
            value: "1600"
          - dps_val: 17
            value: "1700"
          - dps_val: 18
            value: "1800"
          - dps_val: 19
            value: "1900"
          - dps_val: 20
            value: "2000"
          - dps_val: 25
            value: "2500"
          - dps_val: 30
            value: "3000"
          - dps_val: 35
            value: "3500"
          - dps_val: 40
            value: "4000"
          - dps_val: 45
            value: "4500"
          - dps_val: 50
            value: "5000"
  - entity: select
    name: Mode6 Allowed Flow Time
    category: config
    dps:
      - id: 114
        type: integer
        unit: hr
        name: option
        mapping:
          - dps_val: 3
            value: "0.3"
          - dps_val: 4
            value: "0.4"
          - dps_val: 5
            value: "0.5"
          - dps_val: 6
            value: "0.6"
          - dps_val: 7
            value: "0.7"
          - dps_val: 8
            value: "0.8"
          - dps_val: 9
            value: "0.9"
          - dps_val: 10
            value: "1.0"
          - dps_val: 11
            value: "1.1"
          - dps_val: 12
            value: "1.2"
          - dps_val: 13
            value: "1.3"
          - dps_val: 14
            value: "1.4"
          - dps_val: 15
            value: "1.5"
          - dps_val: 16
            value: "1.6"
          - dps_val: 17
            value: "1.7"
          - dps_val: 18
            value: "1.8"
          - dps_val: 19
            value: "1.9"
          - dps_val: 20
            value: "2.0"
          - dps_val: 21
            value: "2.1"
          - dps_val: 22
            value: "2.2"
          - dps_val: 23
            value: "2.3"
          - dps_val: 24
            value: "2.4"
          - dps_val: 25
            value: "2.5"
          - dps_val: 26
            value: "2.6"
          - dps_val: 27
            value: "2.7"
          - dps_val: 28
            value: "2.8"
          - dps_val: 29
            value: "2.9"
          - dps_val: 30
  - entity: select
    name: Mode6 Allowed Flow Volume
    category: config
    dps:
      - id: 117
        type: integer
        unit: L
        name: option
        mapping:
          - dps_val: 0
            value: "50"
          - dps_val: 1
            value: "100"
          - dps_val: 2
            value: "200"
          - dps_val: 3
            value: "300"
          - dps_val: 4
            value: "400"
          - dps_val: 5
            value: "500"
          - dps_val: 6
            value: "600"
          - dps_val: 7
            value: "700"
          - dps_val: 8
            value: "800"
          - dps_val: 9
            value: "900"
          - dps_val: 10
            value: "1000"
          - dps_val: 11
            value: "1100"
          - dps_val: 12
            value: "1200"
          - dps_val: 13
            value: "1300"
          - dps_val: 14
            value: "1400"
          - dps_val: 15
            value: "1500"
          - dps_val: 16
            value: "1600"
          - dps_val: 17
            value: "1700"
          - dps_val: 18
            value: "1800"
          - dps_val: 19
            value: "1900"
          - dps_val: 20
            value: "2000"
          - dps_val: 25
            value: "2500"
          - dps_val: 30
            value: "3000"
          - dps_val: 35
            value: "3500"
          - dps_val: 40
            value: "4000"
          - dps_val: 45
            value: "4500"
          - dps_val: 50
            value: "5000"
  - entity: switch
    name: Allowed Min. Flow Rate Active
    dps:
      - id: 118
        type: boolean
        name: switch
  - entity: select
    name: Allowed Min. Flow Rate
    category: config
    dps:
      - id: 119
        type: string
        name: option
        unit: L/h
        mapping:
          - dps_val: 0
            value: "2.5"
          - dps_val: 1
            value: "5"
          - dps_val: 2
            value: "7.5"
          - dps_val: 3
            value: "10"
          - dps_val: 4
            value: "12.5"
          - dps_val: 5
            value: "15"
          - dps_val: 6
            value: "17.5"
          - dps_val: 7
            value: "20.0"
          - dps_val: 8
            value: "22.5"
          - dps_val: 9
            value: "25.0"
#
# UNKOWN ENTITIES
#
#  - entity: sensor
#    name: DPS121
#    class: volume_flow_rate
#    dps:
#      - id: 121
#        type: integer
#        optional: true
#        name: sensor
#        unit: L/h
#        mapping:
#          - scale: 1000.0
#  - entity: sensor
#    name: DPS122
#    class: volume_flow_rate
#    dps:
#      - id: 122
#        type: integer
#        optional: true
#        name: sensor
#        unit: L/h
#        mapping:
#          - scale: 1000.0
#  - entity: sensor
#    name: DPS123
#    class: volume_flow_rate
#    dps:
#      - id: 123
#        type: integer
#        optional: true
#        name: sensor
#        unit: L/h
#        mapping:
#          - scale: 1000.0
#  - entity: sensor
#    name: DPS124
#    class: volume_flow_rate
#    dps:
#      - id: 124
#        type: integer
#        name: sensor
#        unit: L/h
#        mapping:
#         - scale: 1000.0

I also updated my dashboard to use the visibility options to control the configuration items:

Note: There is a defect in Frizzlife firmware where selecting “Auto” protection mode loses the setting for the “Advanced” mode # setting.

You need to toggle a mode number selection when returning to Advanced mode from Auto mode to make Advanced mode permanent. Otherwise Auto mode remains active. This occurs both in HomeAssistant and SmartLife.

Maybe Frizzlife will provide an update in the future.

And the raw yaml is:

views:
  - title: Home
    sections:
      - type: grid
        cards:
          - type: heading
            heading: Valve Control
            heading_style: title
            grid_options:
              columns: full
              rows: 1
          - show_name: true
            show_icon: true
            type: button
            entity: valve.smart_water_meter
            tap_action:
              action: more-info
            grid_options:
              columns: 12
              rows: 2
          - type: entities
            entities:
              - entity: switch.smart_water_meter_protection_enabled
                name: Protection Mode
              - entity: switch.smart_water_meter_allowed_min_flow_rate_active
                name: Allowed Min. Flow Rate Active
            grid_options:
              columns: 9
              rows: 2
        column_span: 4
      - type: grid
        cards:
          - type: heading
            heading: Sensors
            heading_style: title
          - type: horizontal-stack
            cards:
              - type: custom:apexcharts-card
                overflow: hidden
                experimental:
                  color_threshold: true
                  disable_config_validation: true
                layout_options:
                  grid_columns: 4
                  grid_rows: 4
                graph_span: 1d
                span:
                  start: day
                header:
                  show: true
                  title: Volume Today
                  show_states: true
                  colorize_states: true
                series:
                  - entity: sensor.smart_water_meter_volume_today
                    stroke_width: 2
                    curve: smooth
                    show:
                      header_color_threshold: true
                    fill_raw: last
                    color_threshold:
                      - value: 60
                        color: steelblue
                      - value: 200
                        color: midnightblue
                      - value: 350
                        color: green
                      - value: 450
                        color: green
                      - value: 500
                        color: orange
                      - value: 550
                        color: orangered
                      - value: 600
                        color: red
          - type: horizontal-stack
            cards:
              - type: custom:apexcharts-card
                experimental:
                  color_threshold: true
                  disable_config_validation: true
                layout_options:
                  grid_columns: 4
                  grid_rows: 3
                graph_span: 1d
                header:
                  show: true
                  title: Current Flow Rate
                  show_states: true
                  colorize_states: true
                series:
                  - entity: sensor.smart_water_meter_current_flow_rate
                    stroke_width: 2
                    curve: smooth
                    show:
                      header_color_threshold: true
                    fill_raw: last
                    color_threshold:
                      - value: 60
                        color: steelblue
                      - value: 200
                        color: midnightblue
                      - value: 300
                        color: green
                      - value: 500
                        color: green
                      - value: 700
                        color: orange
                      - value: 1200
                        color: orangered
                      - value: 1400
                        color: red
          - type: horizontal-stack
            cards:
              - type: custom:apexcharts-card
                experimental:
                  color_threshold: true
                  disable_config_validation: true
                layout_options:
                  grid_columns: 4
                  grid_rows: 2
                graph_span: 1d
                header:
                  show: true
                  title: Pressure
                  show_states: true
                  colorize_states: true
                series:
                  - entity: sensor.smart_water_monitor_pressure
                    stroke_width: 2
                    curve: smooth
                    show:
                      header_color_threshold: true
                    fill_raw: last
                    color_threshold:
                      - value: 50
                        color: red
                      - value: 55
                        color: orangerd
                      - value: 60
                        color: midnightblue
                      - value: 65
                        color: green
                      - value: 70
                        color: orange
                      - value: 75
                        color: orangered
                      - value: 80
                        color: red
          - type: horizontal-stack
            cards:
              - type: custom:apexcharts-card
                experimental:
                  color_threshold: true
                  disable_config_validation: true
                layout_options:
                  grid_columns: 4
                  grid_rows: 3
                graph_span: 1d
                header:
                  show: true
                  title: Temperature
                  show_states: true
                  colorize_states: true
                series:
                  - entity: sensor.smart_water_monitor_temperature
                    stroke_width: 2
                    curve: smooth
                    show:
                      header_color_threshold: true
                    fill_raw: last
                    color_threshold:
                      - value: 0
                        color: steelblue
                      - value: 22
                        color: midnightblue
                      - value: 24
                        color: green
                      - value: 25
                        color: green
                      - value: 27
                        color: orange
                      - value: 30
                        color: orangered
                      - value: 35
                        color: red
        column_span: 10
      - type: grid
        cards:
          - type: heading
            heading: Configuration
            heading_style: title
            grid_options:
              columns: full
              rows: 1
          - type: entities
            entities:
              - entity: select.smart_water_meter_protection_mode
            visibility:
              - condition: state
                entity: switch.smart_water_meter_protection_enabled
                state: 'on'
          - type: entities
            entities:
              - entity: select.smart_water_meter_auto_mode
            visibility:
              - condition: state
                entity: select.smart_water_meter_protection_mode
                state: Auto
              - condition: state
                entity: switch.smart_water_meter_protection_enabled
                state: 'on'
          - type: entities
            entities:
              - entity: select.smart_water_meter_advanced_mode
            visibility:
              - condition: state
                entity: select.smart_water_meter_protection_mode
                state: Advanced
              - condition: state
                entity: switch.smart_water_meter_protection_enabled
                state: 'on'
          - type: entities
            entities:
              - entity: select.smart_water_meter_mode4_allowed_flow_volume
              - entity: select.smart_water_meter_mode4_allowed_flow_time
            visibility:
              - condition: state
                entity: select.smart_water_meter_advanced_mode
                state: Mode 4
              - condition: state
                entity: select.smart_water_meter_protection_mode
                state: Advanced
              - condition: state
                entity: switch.smart_water_meter_protection_enabled
                state: 'on'
          - type: entities
            entities:
              - entity: select.smart_water_meter_mode5_allowed_flow_volume
              - entity: select.smart_water_meter_mode5_allowed_flow_time
            visibility:
              - condition: state
                entity: select.smart_water_meter_advanced_mode
                state: Mode 5
              - condition: state
                entity: select.smart_water_meter_protection_mode
                state: Advanced
              - condition: state
                entity: switch.smart_water_meter_protection_enabled
                state: 'on'
          - type: entities
            entities:
              - entity: select.smart_water_meter_mode6_allowed_flow_volume
              - entity: select.smart_water_meter_mode6_allowed_flow_time
            visibility:
              - condition: state
                entity: select.smart_water_meter_advanced_mode
                state: Mode 6
              - condition: state
                entity: select.smart_water_meter_protection_mode
                state: Advanced
          - type: entities
            entities:
              - entity: select.smart_water_meter_allowed_min_flow_rate
            visibility:
              - condition: state
                entity: switch.smart_water_meter_allowed_min_flow_rate_active
                state: 'on'
        column_span: 4
    type: sections
    max_columns: 10
    cards: []
1 Like

Awesome, You guys are great. Even though I am new to HA, I am loving the support here. I’ll eventually move all my automations from HE to HA :-).

Here is the yaml I generated with chatgpt’s help. It seems to be working fine. Do you know what’s the diff between dps 104 & 105, I checked the Tuya query and it seems 103 & 105 have very close time stamps so I am assuming 105 might be the current flow rate. Wondering what’s 104. I would like to feed in 5-7 days of data to chatgpt and ask it to create automations for leak detection. As currently I am not able to find optimal limits for avoiding false alarms specially when water softener is running.

name: Smart Water Meter
products:
  - id: eb1a9dccd17a663803qmrt
    manufacturer: Frizzlife
    model: LP365

entities:
  # Valve
  - entity: valve
    class: water
    dps:
      - id: 1
        type: boolean
        name: valve

  # Temperature sensor (converted to F)
  - entity: sensor
    class: temperature
    dps:
      - id: 12
        type: integer
        name: sensor
        unit: °F
        class: measurement
        mapping:
          - scale: 10.0
            invert: false
            transform: value * 9/5 + 32
        range:
          min: 32    # 0C
          max: 428   # 212C

  # Protection Enabled Switch
  - entity: switch
    name: Protection Enabled
    dps:
      - id: 101
        type: boolean
        name: switch

  # Volume Today (Total, in gallons)
  - entity: sensor
    name: Volume Today
    dps:
      - id: 103
        type: integer
        optional: true
        name: sensor
        class: total_increasing
        unit: gal
        mapping:
          - scale: 10.0
            transform: value / 3.785

  # Flow Rate per Minute (in gal/min)
  - entity: sensor
    class: volume_flow_rate
    name: Flow Rate per Minute
    dps:
      - id: 104
        type: integer
        optional: true
        name: sensor
        class: measurement
        unit: gal/min
        mapping:
          - scale: 1
            # Device gives L/h, convert to gal/min
            transform: (value / 3.785) / 60

  # Current Flow Rate (in gal/min)
  - entity: sensor
    class: volume_flow_rate
    name: Current Flow Rate
    dps:
      - id: 105
        type: integer
        name: sensor
        class: measurement
        unit: gal/min
        mapping:
          - scale: 1000.0
            transform: (value / 3.785) / 60

  # Leak Warning
  - entity: sensor
    name: Leak Warning
    dps:
      - id: 106
        type: boolean
        name: sensor

  # Leak Alarm
  - entity: sensor
    name: Leak Alarm
    dps:
      - id: 107
        type: boolean
        name: sensor

  # Alarm Clear Button
  - entity: button
    name: Alarm Clear
    dps:
      - id: 108
        type: boolean
        name: button

  # Protection Mode Select
  - entity: select
    name: Protection Mode
    category: config
    dps:
      - id: 109
        type: string
        name: option
        mapping:
          - dps_val: "AUTO"
            value: "Auto"
          - dps-val: "ADVANCED_SETTING"
            value: "Advanced"

  # AUTO Mode #
  - entity: select
    name: "AUTO Mode #"
    category: config
    dps:
      - id: 110
        type: string
        name: option
        mapping:
          - dps_val: "mode1"
            value: "Mode 1"
          - dps_val: "mode2"
            value: "Mode 2"
          - dps_val: "mode3"
            value: "Mode 3"

  # ADVANCED Mode #
  - entity: select
    name: "ADVANCED Mode #"
    category: config
    dps:
      - id: 111
        type: string
        name: option
        mapping:
          - dps_val: "mode4"
            value: "Mode 4"
          - dps_val: "mode5"
            value: "Mode 5"
          - dps_val: "mode6"
            value: "Mode 6"

  # Mode4 Allowed Flow Time (hr)
  - entity: select
    name: Mode4 Allowed Flow Time
    category: config
    dps:
      - id: 112
        type: integer
        unit: hr
        name: option
        mapping:
          # unchanged (same mapping as before)
          - dps_val: 3
            value: "0.3"
          - dps_val: 4
            value: "0.4"
          - dps_val: 5
            value: "0.5"
          - dps_val: 6
            value: "0.6"
          - dps_val: 7
            value: "0.7"
          - dps_val: 8
            value: "0.8"
          - dps_val: 9
            value: "0.9"
          - dps_val: 10
            value: "1.0"
          - dps_val: 11
            value: "1.1"
          - dps_val: 12
            value: "1.2"
          - dps_val: 13
            value: "1.3"
          - dps_val: 14
            value: "1.4"
          - dps_val: 15
            value: "1.5"
          - dps_val: 16
            value: "1.6"
          - dps_val: 17
            value: "1.7"
          - dps_val: 18
            value: "1.8"
          - dps_val: 19
            value: "1.9"
          - dps_val: 20
            value: "2.0"
          - dps_val: 21
            value: "2.1"
          - dps_val: 22
            value: "2.2"
          - dps_val: 23
            value: "2.3"
          - dps_val: 24
            value: "2.4"
          - dps_val: 25
            value: "2.5"
          - dps_val: 26
            value: "2.6"
          - dps_val: 27
            value: "2.7"
          - dps_val: 28
            value: "2.8"
          - dps_val: 29
            value: "2.9"
          - dps_val: 30
            value: "3.0"

  # Mode4 Allowed Flow Volume (gal)
  - entity: select
    name: Mode4 Allowed Flow Volume
    category: config
    dps:
      - id: 115
        type: integer
        unit: gal
        name: option
        mapping:
          - dps_val: 0
            value: "13"    # 50 L
          - dps_val: 1
            value: "26"    # 100 L
          - dps_val: 2
            value: "53"    # 200 L
          - dps_val: 3
            value: "79"    # 300 L
          - dps_val: 4
            value: "106"   # 400 L
          - dps_val: 5
            value: "132"   # 500 L
          - dps_val: 6
            value: "158"   # 600 L
          - dps_val: 7
            value: "185"   # 700 L
          - dps_val: 8
            value: "211"   # 800 L
          - dps_val: 9
            value: "238"   # 900 L
          - dps_val: 10
            value: "264"   # 1000 L
          - dps_val: 11
            value: "291"   # 1100 L
          - dps_val: 12
            value: "317"   # 1200 L
          - dps_val: 13
            value: "343"   # 1300 L
          - dps_val: 14
            value: "370"   # 1400 L
          - dps_val: 15
            value: "396"   # 1500 L
          - dps_val: 16
            value: "423"   # 1600 L
          - dps_val: 17
            value: "449"   # 1700 L
          - dps_val: 18
            value: "476"   # 1800 L
          - dps_val: 19
            value: "502"   # 1900 L
          - dps_val: 20
            value: "528"   # 2000 L
          - dps_val: 25
            value: "660"   # 2500 L
          - dps_val: 30
            value: "793"   # 3000 L
          - dps_val: 35
            value: "925"   # 3500 L
          - dps_val: 40
            value: "1058"  # 4000 L
          - dps_val: 45
            value: "1191"  # 4500 L
          - dps_val: 50
            value: "1321"  # 5000 L

  # Mode5 Allowed Flow Time (hr)
  - entity: select
    name: Mode5 Allowed Flow Time
    category: config
    dps:
      - id: 113
        type: integer
        unit: hr
        name: option
        mapping:
          # unchanged
          - dps_val: 3
            value: "0.3"
          - dps_val: 4
            value: "0.4"
          - dps_val: 5
            value: "0.5"
          - dps_val: 6
            value: "0.6"
          - dps_val: 7
            value: "0.7"
          - dps_val: 8
            value: "0.8"
          - dps_val: 9
            value: "0.9"
          - dps_val: 10
            value: "1.0"
          - dps_val: 11
            value: "1.1"
          - dps_val: 12
            value: "1.2"
          - dps_val: 13
            value: "1.3"
          - dps_val: 14
            value: "1.4"
          - dps_val: 15
            value: "1.5"
          - dps_val: 16
            value: "1.6"
          - dps_val: 17
            value: "1.7"
          - dps_val: 18
            value: "1.8"
          - dps_val: 19
            value: "1.9"
          - dps_val: 20
            value: "2.0"
          - dps_val: 21
            value: "2.1"
          - dps_val: 22
            value: "2.2"
          - dps_val: 23
            value: "2.3"
          - dps_val: 24
            value: "2.4"
          - dps_val: 25
            value: "2.5"
          - dps_val: 26
            value: "2.6"
          - dps_val: 27
            value: "2.7"
          - dps_val: 28
            value: "2.8"
          - dps_val: 29
            value: "2.9"
          - dps_val: 30

  # Mode5 Allowed Flow Volume (gal)
  - entity: select
    name: Mode5 Allowed Flow Volume
    category: config
    dps:
      - id: 116
        type: integer
        unit: gal
        name: option
        mapping:
          - dps_val: 0
            value: "13"
          - dps_val: 1
            value: "26"
          - dps_val: 2
            value: "53"
          - dps_val: 3
            value: "79"
          - dps_val: 4
            value: "106"
          - dps_val: 5
            value: "132"
          - dps_val: 6
            value: "158"
          - dps_val: 7
            value: "185"
          - dps_val: 8
            value: "211"
          - dps_val: 9
            value: "238"
          - dps_val: 10
            value: "264"
          - dps_val: 11
            value: "291"
          - dps_val: 12
            value: "317"
          - dps_val: 13
            value: "343"
          - dps_val: 14
            value: "370"
          - dps_val: 15
            value: "396"
          - dps_val: 16
            value: "423"
          - dps_val: 17
            value: "449"
          - dps_val: 18
            value: "476"
          - dps_val: 19
            value: "502"
          - dps_val: 20
            value: "528"
          - dps_val: 25
            value: "660"
          - dps_val: 30
            value: "793"
          - dps_val: 35
            value: "925"
          - dps_val: 40
            value: "1058"
          - dps_val: 45
            value: "1191"
          - dps_val: 50
            value: "1321"

  # Mode6 Allowed Flow Time (hr)
  - entity: select
    name: Mode6 Allowed Flow Time
    category: config
    dps:
      - id: 114
        type: integer
        unit: hr
        name: option
        mapping:
          # unchanged
          - dps_val: 3
            value: "0.3"
          - dps_val: 4
            value: "0.4"
          - dps_val: 5
            value: "0.5"
          - dps_val: 6
            value: "0.6"
          - dps_val: 7
            value: "0.7"
          - dps_val: 8
            value: "0.8"
          - dps_val: 9
            value: "0.9"
          - dps_val: 10
            value: "1.0"
          - dps_val: 11
            value: "1.1"
          - dps_val: 12
            value: "1.2"
          - dps_val: 13
            value: "1.3"
          - dps_val: 14
            value: "1.4"
          - dps_val: 15
            value: "1.5"
          - dps_val: 16
            value: "1.6"
          - dps_val: 17
            value: "1.7"
          - dps_val: 18
            value: "1.8"
          - dps_val: 19
            value: "1.9"
          - dps_val: 20
            value: "2.0"
          - dps_val: 21
            value: "2.1"
          - dps_val: 22
            value: "2.2"
          - dps_val: 23
            value: "2.3"
          - dps_val: 24
            value: "2.4"
          - dps_val: 25
            value: "2.5"
          - dps_val: 26
            value: "2.6"
          - dps_val: 27
            value: "2.7"
          - dps_val: 28
            value: "2.8"
          - dps_val: 29
            value: "2.9"
          - dps_val: 30

  # Mode6 Allowed Flow Volume (gal)
  - entity: select
    name: Mode6 Allowed Flow Volume
    category: config
    dps:
      - id: 117
        type: integer
        unit: gal
        name: option
        mapping:
          - dps_val: 0
            value: "13"
          - dps_val: 1
            value: "26"
          - dps_val: 2
            value: "53"
          - dps_val: 3
            value: "79"
          - dps_val: 4
            value: "106"
          - dps_val: 5
            value: "132"
          - dps_val: 6
            value: "158"
          - dps_val: 7
            value: "185"
          - dps_val: 8
            value: "211"
          - dps_val: 9
            value: "238"
          - dps_val: 10
            value: "264"
          - dps_val: 11
            value: "291"
          - dps_val: 12
            value: "317"
          - dps_val: 13
            value: "343"
          - dps_val: 14
            value: "370"
          - dps_val: 15
            value: "396"
          - dps_val: 16
            value: "423"
          - dps_val: 17
            value: "449"
          - dps_val: 18
            value: "476"
          - dps_val: 19
            value: "502"
          - dps_val: 20
            value: "528"
          - dps_val: 25
            value: "660"

Also I don’t smart water meter flow rate active sensor switch in your yaml so my dashboard is giving errors “entity not found”

Nice, I like the copious use of comments.

103 is the volume of water provided today - resets to 0 at midnight.
104 - had to guess on this one - my best guess is it’s the cumulative flow based on a sliding hour window (i.e. Liters per hour) - it updates once an hour.
105 is the current flow being supplied (i.e. I think this updates every 30 seconds but may be more often) - is considerably larger than 104.

Note: I now have a fair bit of stats gathered, in the next day or two I’ll run through them to see if my units are correct. I’ll try an integration over the current flow to see if it matches the flow per hour numbers.

What does your current water flow look like while the water softener is being recharged? Is the recharge occur at a scheduled time?

Is there something about the flow that is unique so you can trigger an automation to either turn off protection (not optimal) or briefly change your limits (better) for a set time period.

Thanks for info on 104 & 105, I guess I need to change 104 to gal / hr then. I am still trying to figure out the pattern to establish the limits. I might pull the flow rate and total volume data for past 10-14 days and review it. Below is 5 day plot as of now. I haven’t yet looked the recharge pattern yet, its also possible that recharge cycle may now show significant flow since Value is connected to Out Line of softener which ideally shouldn’t have any flow during recharge, It was too difficult to connect it to In-line of Softener :

Also not sure why all the configuration isn;t showing on my dashboard like yours :-(. I’ll do some digging during the weekend and ask for your help if needed. Thanks a lot for all the good work you have done.

DjAnu: I was on Vacation for the last 2 weeks so didn’t get a chance to respond.

I set up the configuration with visibility options - so with protection mode turned off, the configuration items don’t appear. Also, you have an entity not found for the Allowed Min Flow. You must have a typo or changed the name of that entity.

Try turning on protection mode, and the “Protection Mode”, “Mode #”, “Allowed Flow Volume”, and “Allowed Flow Time” should be displayed.

You’ll have to investigate why the “Allowed Min Flow” entity is not found.

@grimmt, thanks so much for figuring this out and sharing.

Not sure if it helps anyone, but I added a “class: water” to the Volume Today entity, which allowed me to setup water monitoring in the energy section of Home Assistant

  - entity: sensor
    name: Volume Today
    class: water

NOTE to all:
I updated Tuya yesterday and was surprised to find that the update replaced the devices section in the tuya_local custom_component. This removed my frizzlife yaml file - Ouch.

Luckily I had a backup and simply restoring the file to the directory and then reloading the device configuration got everything working again.

Lesson Learned: Make sure you keep a copy of your frizzlife configuration file!

Thanks @clintwg I’ll give that a shot - I’m still learning about how all of this works.

Is there a way to see total gallons (not just “today”)? Seems one could add the value at the end of ever day as a running total, but I think that’s asking for trouble. I want a way to track my water filter life. Even if it’s lifetime, I can set up a helper with a reset and basic math to find total since the last filter replacement.