Skip to content

Frizzlife lp365#4703

Open
rwalker777 wants to merge 10 commits intomake-all:mainfrom
rwalker777:Frizzlife-LP365
Open

Frizzlife lp365#4703
rwalker777 wants to merge 10 commits intomake-all:mainfrom
rwalker777:Frizzlife-LP365

Conversation

@rwalker777
Copy link
Copy Markdown

Add support for new LP365-P variant and LP365. Support for metric/imperial.

See testing and discussion here:
https://community.home-assistant.io/t/frizzlife-smart-water-monitor/875335

Add support for Frizzlife LP365 (non-P) and support for metric/imperial units.
Updated product information and entity definitions for the Frizzlife LP365P water monitor. Added manufacturer details and improved structure for better clarity.
@make-all make-all added the needs rework Rework required before merge label Mar 17, 2026
@make-all
Copy link
Copy Markdown
Owner

This needs reworking to get rid of whatever it is that is preventing line 2 from matching (I suspect line end changes).

@make-all make-all moved this from 👀 In review to 📋 Backlog in Tuya Local Mar 17, 2026
@rwalker777
Copy link
Copy Markdown
Author

@make-all Refactored to fix linting errors.

@rwalker777
Copy link
Copy Markdown
Author

@make-all Ok, now the linting is erroring out on the duplicate names which I am selectively enabling based on imperial vs metric units. Can we fix the linter to allow it, as it works great?

@make-all
Copy link
Copy Markdown
Owner

make-all commented Mar 18, 2026

You need to fix your code, not the linter. Duplicate entity ids are not allowed, and the id is based on the device_id+entity name (with fallbacks to translation_key and class).

But rather than changing the names, you should merge the entities into one with conditions to value_redirect to the alternative dp.

@rwalker777
Copy link
Copy Markdown
Author

@make-all Got it. Thanks.

@rwalker777
Copy link
Copy Markdown
Author

Actually, I don't got it... I can't change the units via a conditional. The file I created appeared to work, but all the entities have no units (which breaks everything). The first solution I came up with worked perfectly, what do you consider wrong with that?

@rwalker777
Copy link
Copy Markdown
Author

@make-all Thank you. Didn't know about the translation for temperature, updated that.

@rwalker777
Copy link
Copy Markdown
Author

@make-all Here is another pull request that allows my use case. This is a very narrow scope to only allow duplicate entity names if both of them share the same conditional.

@rwalker777
Copy link
Copy Markdown
Author

@make-all Please advise how you would handle unit switching.

@make-all
Copy link
Copy Markdown
Owner

make-all commented Mar 21, 2026

There are many examples of this in the existing config files for thermostats and air conditioners. Try searching for temp_cur_f or current_temperature_f to find examples.

@rwalker777
Copy link
Copy Markdown
Author

I have tried 3 different AIs and tried doing this by hand, the ONLY way I can make it work is with duplicate entities. Here is an example that complies with your linter, but it DOES NOT WORK. I could not find A SINGLE example where a device had configurable units based on a DPID. I found LOTS of examples of it changing the TEXT label, but not the units.

name: Smart Water Monitor
products:

  • id: 89tojzdfimssmkuk
    manufacturer: Frizzlife
    model: LP365P
    name: Frizzlife LP365P
  • id: eb0a8e6c88ec94012fduxa
    manufacturer: Frizzlife
    model: LP365P
    name: Frizzlife LP365P
  • id: eb1a9dccd17a663803qmrt
    manufacturer: Frizzlife
    model: LP365
    name: Frizzlife LP365
    entities:
  • entity: valve
    class: water
    dps:
    • id: 1
      type: boolean
      name: switch
  • entity: select
    translation_key: temperature_unit
    category: config
    icon: mdi:thermometer
    dps:
    • id: 20
      type: string
      name: option
      optional: true
      mapping:
      • dps_val: f
        value: Fahrenheit
      • dps_val: c
        value: Celsius
  • entity: select
    translation_key: volume_units
    category: config
    icon: mdi:ruler-square
    dps:
    • id: 102
      type: string
      name: option
      mapping:
      • dps_val: us_units
        value: Gallon
      • dps_val: metric_unit
        value: Liter
  • entity: sensor
    name: System Status
    class: enum
    category: diagnostic
    icon: mdi:information-outline
    dps:
    • id: 24
      type: integer
      name: sensor
      mapping:
      • dps_val: 0
        value: Normal
      • dps_val: 1
        value: Warning
      • dps_val: 2
        value: Empty Pipe
      • dps_val: 3
        value: Fault
  • entity: binary_sensor
    class: moisture
    name: Leak Warning
    dps:
    • id: 106
      type: boolean
      name: sensor
  • entity: binary_sensor
    class: problem
    name: Leak Alarm
    dps:
    • id: 107
      type: boolean
      name: sensor
  • entity: binary_sensor
    class: problem
    name: Low Temperature Alarm
    dps:
    • id: 108
      type: boolean
      name: sensor
  • entity: button
    name: Alarm Clear
    category: config
    icon: mdi:alarm-off
    dps:
    • id: 125
      type: string
      name: button
      optional: true
  • entity: sensor
    name: Water Temperature
    class: temperature
    dps:
    • id: 12
      type: integer
      optional: true
      name: sensor
      class: measurement
      mapping:
      • scale: 10.0
    • id: 20
      type: string
      name: unit
      mapping:
      • dps_val: f
        value: F
      • dps_val: c
        value: C
  • entity: sensor
    name: Water Pressure
    class: pressure
    dps:
    • id: 15
      type: integer
      optional: true
      name: sensor
      class: measurement
      mapping:
      • scale: 10.0
    • id: 102
      type: string
      name: unit
      mapping:
      • dps_val: us_units
        value: psi
      • dps_val: metric_unit
        value: bar
  • entity: sensor
    name: Volume Today
    class: water
    dps:
    • id: 103
      type: integer
      optional: true
      name: sensor
      class: total_increasing
      mapping:
      • scale: 10.0
    • id: 102
      type: string
      name: unit
      mapping:
      • dps_val: us_units
        value: gal
      • dps_val: metric_unit
        value: L
  • entity: sensor
    name: Flow Rate per Hour
    class: volume_flow_rate
    dps:
    • id: 104
      type: integer
      optional: true
      name: sensor
      class: measurement
      mapping:
      • scale: 1.0
    • id: 102
      type: string
      name: unit
      mapping:
      • dps_val: us_units
        value: gal/h
      • dps_val: metric_unit
        value: L/h
  • entity: sensor
    name: Flow Rate per Minute
    class: volume_flow_rate
    dps:
    • id: 105
      type: integer
      name: sensor
      class: measurement
      mapping:
      • scale: 1000.0
    • id: 102
      type: string
      name: unit
      mapping:
      • dps_val: us_units
        value: gal/min
      • dps_val: metric_unit
        value: L/h
  • entity: switch
    name: Protection Enabled
    dps:
    • id: 101
      type: boolean
      name: switch
  • 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
    • id: 109
      type: string
      name: mode_available
      hidden: true
  • 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
    • id: 109
      type: string
      name: mode_available
      hidden: true
  • entity: number
    name: Advanced Allowed Flow Time
    category: config
    dps:
    • id: 111
      type: string
      name: value
      unit: min
      range:
      min: 1
      max: 1000
      mapping:
      • dps_val: mode4
        value_redirect: mode4_time
      • dps_val: mode5
        value_redirect: mode5_time
      • dps_val: mode6
        value_redirect: mode6_time
    • id: 112
      type: integer
      name: mode4_time
      mapping:
      • scale: 1.0
    • id: 113
      type: integer
      name: mode5_time
      mapping:
      • scale: 1.0
    • id: 114
      type: integer
      name: mode6_time
      mapping:
      • scale: 1.0
    • id: 109
      type: string
      name: mode_available
      hidden: true
  • entity: number
    name: Advanced Allowed Flow Volume (Gallons)
    category: config
    dps:
    • id: 111
      type: string
      name: value
      unit: gal
      range:
      min: 0
      max: 5000
      mapping:
      • dps_val: mode4
        value_redirect: mode4_vol
      • dps_val: mode5
        value_redirect: mode5_vol
      • dps_val: mode6
        value_redirect: mode6_vol
    • id: 115
      type: integer
      name: mode4_vol
      mapping:
      • scale: 10.0
    • id: 116
      type: integer
      name: mode5_vol
      mapping:
      • scale: 10.0
    • id: 117
      type: integer
      name: mode6_vol
      mapping:
      • scale: 10.0
    • id: 102
      type: string
      name: unit_available
      hidden: true
      mapping:
      • dps_val: us_units
        value: true
      • value: false
    • id: 109
      type: string
      name: mode_available
      hidden: true
  • entity: number
    name: Advanced Allowed Flow Volume (Liters)
    category: config
    dps:
    • id: 111
      type: string
      name: value
      unit: L
      range:
      min: 0
      max: 20000
      mapping:
      • dps_val: mode4
        value_redirect: mode4_vol
      • dps_val: mode5
        value_redirect: mode5_vol
      • dps_val: mode6
        value_redirect: mode6_vol
    • id: 115
      type: integer
      name: mode4_vol
      mapping:
      • scale: 100.0
    • id: 116
      type: integer
      name: mode5_vol
      mapping:
      • scale: 100.0
    • id: 117
      type: integer
      name: mode6_vol
      mapping:
      • scale: 100.0
    • id: 102
      type: string
      name: unit_available
      hidden: true
      mapping:
      • dps_val: metric_unit
        value: true
      • value: false
    • id: 109
      type: string
      name: mode_available
      hidden: true
  • entity: switch
    name: Allow Minimal Flow
    category: config
    dps:
    • id: 118
      type: boolean
      name: switch
    • id: 109
      type: string
      name: mode_available
      hidden: true
  • entity: select
    name: Allowed Minimal Flow Rate
    category: config
    dps:
    • id: 119
      type: integer
      name: option
      mapping:
      • dps_val: 0
        value: 0.01 Gal / 2.5 L
      • dps_val: 1
        value: 0.02 Gal / 5.0 L
      • dps_val: 2
        value: 0.03 Gal / 7.5 L
      • dps_val: 3
        value: 0.04 Gal / 10.0 L
      • dps_val: 4
        value: 0.05 Gal / 12.5 L
      • dps_val: 5
        value: 0.06 Gal / 15.0 L
      • dps_val: 6
        value: 0.07 Gal / 17.5 L
      • dps_val: 7
        value: 0.08 Gal / 20.0 L
      • dps_val: 8
        value: 0.09 Gal / 22.5 L
      • dps_val: 9
        value: 0.10 Gal / 25.0 L
    • id: 109
      type: string
      name: mode_available
      hidden: true
    • id: 118
      type: boolean
      name: minimal_flow_enabled
      hidden: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rework Rework required before merge

Projects

Status: 📋 Backlog

Development

Successfully merging this pull request may close these issues.

2 participants