name: Filament dryer
products:
  - id: mxct11k2jqpak13a
    manufacturer: GratKit
    model: Firefly Smart Dryer Box
entities:
  - entity: switch
    icon: "mdi:heat-pump"
    dps:
      - id: 1
        name: switch
        type: boolean
  - entity: number
    name: Drying temperature
    category: config
    icon: "mdi:thermometer-lines"
    mode: box
    dps:
      - id: 20
        type: integer
        name: value
        unit: C
        range:
          min: 40
          max: 70
  - entity: sensor
    class: temperature
    dps:
      - id: 21
        type: integer
        name: sensor
        unit: C
        class: measurement
  - entity: sensor
    translation_key: time_remaining
    class: duration
    dps:
      - id: 101
        type: integer
        name: sensor
        unit: min
  - entity: number
    name: Drying time
    icon: "mdi:fan-clock"
    category: config
    dps:
      - id: 101
        type: integer
        name: value
        unit: min
        range:
          min: 0
          max: 1440
  - entity: sensor
    class: humidity
    dps:
      - id: 102
        type: integer
        name: sensor
        unit: "%"
        class: measurement
  - entity: light
    icon: "mdi:led-strip-variant"
    dps:
      - id: 103
        type: string
        name: switch
        mapping:
          - dps_val: "0"
            value: false
          - dps_val: "4"
            value: true
          - value: true
            hidden: true
      - id: 103
        type: string
        name: named_color
        mapping:
          - dps_val: "0"
            value: black
          - dps_val: "1"
            value: red
          - dps_val: "2"
            value: green
          - dps_val: "3"
            value: blue
          - dps_val: "4"
            value: white
          - dps_val: "5"
            value: yellow
          - dps_val: "6"
            value: cyan
          - dps_val: "7"
            value: purple
          - dps_val: "8"
            value: orange
          - dps_val: "9"
            value: pink
          - dps_val: "10"
            value: grey
          - value: grey
            hidden: true
      - id: 103
        type: string
        name: effect
        mapping:
          - dps_val: "4"
            value: "off"
          - dps_val: "10"
            value: Rainbow fade
          - dps_val: "11"
            value: Rainbow blink
          - dps_val: "12"
            value: Rainbow smooth
          - value: "off"
            hidden: true
  - entity: sensor
    class: temperature
    name: Heating plate temperature
    category: diagnostic
    icon: "mdi:heating-coil"
    dps:
      - id: 104
        type: integer
        name: sensor
        unit: C
        class: measurement
  - entity: select
    name: Filament type
    icon: "mdi:movie-roll"
    category: config
    dps:
      - id: 105
        type: string
        name: option
        mapping:
          - dps_val: PLA
            value: "PLA"
          - dps_val: PLA_J
            value: "PLA+"
          - dps_val: PETG
            value: "PETG"
          - dps_val: ABS
            value: "ABS"
          - dps_val: Nylon
            value: "Nylon"
          - dps_val: PC
            value: "PC"
          - dps_val: HIPS
            value: "HIPS"
          - dps_val: TPU
            value: "TPU"
          - dps_val: DIY1
            value: "DIY1"
          - dps_val: DIY2
            value: "DIY2"
  - entity: sensor
    name: Error
    category: diagnostic
    class: enum
    icon: "mdi:alert-circle-outline"
    dps:
      - id: 106
        name: sensor
        type: string
        mapping:
          - dps_val: 0
            value: "Normal"
          - dps_val: 1
            value: "Dryer box tilted"
          - dps_val: 2
            value: "Heat plate overheated"
          - dps_val: 3
            value: "Dryer box overheated"
          - dps_val: 4
            value: "Fan RPM too low"
          - dps_val: 5
            value: "5"
          - dps_val: 6
            value: "6"
          - dps_val: 7
            value: "7"
          - dps_val: 8
            value: "8"
          - dps_val: 9
            value: "9"
  - entity: sensor
    name: Fan speed
    category: diagnostic
    icon: "mdi:fan"
    dps:
      - id: 107
        type: integer
        name: sensor
        unit: "rpm"
  - entity: binary_sensor
    name: USB
    icon: "mdi:usb-port"
    category: diagnostic
    dps:
      - id: 108
        type: boolean
        name: sensor
  - entity: switch
    icon: "mdi:volume-high"
    name: Speaker
    category: config
    dps:
      - id: 109
        type: boolean
        name: switch

  - entity: light
    translation_key: display
    dps:
      - id: 110
        type: boolean
        name: switch
