name: BBQ thermometer
products:
  - id: wavwesi8clrfwx68
    manufacturer: Inkbird
    model: IBBQ-4T v2.x
entities:
  - entity: sensor
    name: Temperature probe 1
    class: temperature
    dps:
      - id: 107
        type: base64
        name: sensor
        class: measurement
        optional: true
        mask: FFFFFF
        endianness: little
        mapping:
          - scale: 100
        unit: F
  - entity: sensor
    name: Temperature probe 2
    class: temperature
    dps:
      - id: 107
        type: base64
        name: sensor
        class: measurement
        optional: true
        mask: FFFFFF00000000
        endianness: little
        mapping:
          - scale: 100
        unit: F
  - entity: sensor
    name: Temperature probe 3
    class: temperature
    dps:
      - id: 107
        type: base64
        name: sensor
        class: measurement
        optional: true
        mask: FFFFFF0000000000000000
        endianness: little
        mapping:
          - scale: 100
        unit: F
  - entity: sensor
    name: Temperature probe 4
    class: temperature
    dps:
      - id: 107
        type: base64
        name: sensor
        class: measurement
        optional: true
        mask: FFFFFF000000000000000000000000
        endianness: little
        mapping:
          - scale: 100
        unit: F
  - entity: binary_sensor
    class: power
    category: diagnostic
    dps:
      - id: 1
        type: boolean
        name: sensor
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 111
        type: bitfield
        name: sensor
        optional: true
        mapping:
          - dps_val: 0
            value: false
          - dps_val: null
            value: false
          - value: true
      - id: 111
        type: bitfield
        optional: true
        name: fault_code
  - entity: select
    translation_key: temperature_unit
    category: config
    dps:
      - id: 19
        type: string
        name: option
        mapping:
          - dps_val: f
            value: fahrenheit
          - dps_val: c
            value: celsius
  - entity: sensor
    class: battery
    category: diagnostic
    dps:
      - id: 101
        type: integer
        name: sensor
        unit: "%"
  - entity: number
    name: Screen timeout
    category: config
    class: duration
    icon: "mdi:camera-timer"
    dps:
      - id: 102
        type: integer
        name: value
        unit: s
        range:
          min: 0
          max: 3600
  - entity: switch
    name: Alarm
    category: config
    dps:
      - id: 104
        type: boolean
        name: switch
  - entity: sensor
    name: Alarm state
    category: diagnostic
    dps:
      - id: 105
        type: integer
        name: sensor
  - entity: number
    name: Preset temperature 1
    category: config
    icon: "mdi:thermometer-alert"
    dps:
      - id: 106
        type: base64
        name: value
        optional: true
        unit: F
        range:
          min: 0
          max: 50000
        # mask seems to be wrong, only data available has 40 A characters,
        # presumably base64 encoded 28 bytes of 00, but could also be
        # 20 hex bytes. Not sure of the meaning, whether it is 7 (or 5)
        # bytes per probe or some of the bytes are general settings.
        mask: FFFF000000000000
        endianness: little
        mapping:
          - scale: 100
  - entity: number
    name: Preset temperature 2
    category: config
    icon: "mdi:thermometer-alert"
    dps:
      - id: 106
        type: base64
        name: value
        optional: true
        unit: F
        range:
          min: 0
          max: 50000
        mask: 0000FFFF00000000
        endianness: little
        mapping:
          - scale: 100
  - entity: number
    name: Preset temperature 3
    category: config
    icon: "mdi:thermometer-alert"
    dps:
      - id: 106
        type: base64
        name: value
        optional: true
        unit: F
        range:
          min: 0
          max: 50000
        mask: 00000000FFFF0000
        endianness: little
        mapping:
          - scale: 100
  - entity: number
    name: Preset temperature 4
    category: config
    icon: "mdi:thermometer-alert"
    dps:
      - id: 106
        type: base64
        name: value
        optional: true
        unit: F
        range:
          min: 0
          max: 50000
        mask: 000000000000FFFF
        endianness: little
        mapping:
          - scale: 100
