name: Renpho RP-AP001S purifier
products:
  - id: oaleouzsq0sk4quk
primary_entity:
  entity: fan
  icon: "mdi:air-purifier"
  translation_only_key: fan_with_presets
  dps:
    - id: 1
      name: switch
      type: boolean
    - id: 4
      name: preset_mode
      type: string
      mapping:
        - dps_val: low
          value: sleep
        - dps_val: mid
          value: fresh
        - dps_val: high
          value: strong
        - dps_val: auto
          value: smart
    - id: 19
      name: timer
      type: string
    - id: 22
      name: air_quality
      type: string
    - id: 102
      name: prefilter_life
      type: integer
    - id: 103
      name: charcoal_filter_life
      type: integer
    - id: 104
      name: activated_charcoal_filter_life
      type: integer
    - id: 105
      name: hepa_filter_life
      type: integer
secondary_entities:
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 7
        name: lock
        type: boolean
  - entity: light
    name: AQ indicator
    category: config
    class: switch
    dps:
      - id: 8
        name: switch
        type: boolean
        mapping:
          - dps_val: true
            icon: "mdi:led-on"
          - dps_val: false
            icon: "mdi:led-off"
  - entity: switch
    translation_key: sleep
    class: switch
    dps:
      - id: 101
        name: switch
        type: boolean
  - entity: sensor
    name: Air quality
    class: enum
    category: diagnostic
    dps:
      - id: 22
        type: string
        name: sensor
        mapping:
          - dps_val: "bad"
            value: "Bad"
          - dps_val: "fair"
            value: "Fair"
          - dps_val: "good"
            value: "Good"
  - entity: sensor
    name: Prefilter life
    category: diagnostic
    icon: "mdi:air-filter"
    dps:
      - id: 102
        type: integer
        name: sensor
  - entity: sensor
    name: Charcoal filter life
    category: diagnostic
    icon: "mdi:air-filter"
    dps:
      - id: 103
        type: integer
        name: sensor
  - entity: sensor
    name: Active filter life
    category: diagnostic
    icon: "mdi:air-filter"
    dps:
      - id: 104
        type: integer
        name: sensor
  - entity: sensor
    name: HEPA filter life
    category: diagnostic
    icon: "mdi:air-filter"
    dps:
      - id: 105
        type: integer
        name: sensor
