name: Baby sound machine
products:
  - id: 6lqbviusicwtnmkd
    manufacturer: Dreamegg
    model: Nite 1
entities:

  - entity: light
    dps:
      - id: 3
        type: boolean
        name: switch
      - id: 4
        type: string
        name: color_mode
        mapping:
          - dps_val: change
            value: Color Changing
          - dps_val: breath
            value: Color Fading
          - dps_val: sunrise
            value: Sunlight Breathing
          - dps_val: color
            value: hs
          - dps_val: light
            value: color_temp
      - id: 6
        name: brightness
        type: integer
        optional: true
        range:
          min: 1
          max: 1000
      - id: 7
        name: color_temp
        type: integer
        optional: true
        range:
          min: 0
          max: 1000
        mapping:
          - target_range:
              min: 2700
              max: 6500
      - id: 5
        name: rgbhsv
        type: hex
        optional: true
        format:
          - name: h
            bytes: 2
            range:
              min: 0
              max: 360
          - name: s
            bytes: 2
            range:
              min: 0
              max: 1000
          - name: v
            bytes: 2
            range:
              min: 0
              max: 1000

  - entity: siren
    name: Music
    icon: "mdi:surround-sound"
    dps:
      - id: 8
        name: switch
        type: boolean
      - id: 9
        name: volume_level
        type: integer
        range:
          min: 0
          max: 100
        mapping:
          - scale: 100
      - id: 10
        name: tone
        type: string
        mapping:
          - dps_val: "1"
            value: Bird
          - dps_val: "2"
            value: Cricket
          - dps_val: "3"
            value: Campfire
          - dps_val: "4"
            value: Gentle Rain
          - dps_val: "5"
            value: Heavy Rain
          - dps_val: "6"
            value: Rainstorm
          - dps_val: "7"
            value: Brook
          - dps_val: "8"
            value: Gentle Surf
          - dps_val: "9"
            value: Sea Wave
          - dps_val: "10"
            value: Waterfall
          - dps_val: "11"
            value: Wind
          - dps_val: "12"
            value: Sushing
          - dps_val: "13"
            value: Womb Sound
          - dps_val: "14"
            value: Hair Dryer
          - dps_val: "15"
            value: Airplane
          - dps_val: "16"
            value: Cruise Ship
          - dps_val: "17"
            value: Train
          - dps_val: "18"
            value: Wind Chimes
          - dps_val: "19"
            value: White Noise
          - dps_val: "20"
            value: Pink Noise
          - dps_val: "21"
            value: Brown Noise
          - dps_val: "22"
            value: Gentle Fan
          - dps_val: "23"
            value: Box Fan
          - dps_val: "24"
            value: Oscillating Fan
          - dps_val: "25"
            value: Zen
          - dps_val: "26"
            value: Meditation
          - dps_val: "27"
            value: Lullaby
          - dps_val: "28"
            value: Little Star
          - dps_val: "29"
            value: Bedtime
          - dps_val: "30"
            value: Brahm's Lullaby
          - dps_val: "31"
            value: Music Box
          - dps_val: "32"
            value: Piano
          - dps_val: "33"
            value: Mozart
          - dps_val: "34"
            value: Morning
      - id: 20
        name: duration
        type: integer
        unit: min
        range:
          min: 0
          max: 1440

  - entity: select
    translation_key: scene
    dps:
      - id: 13
        type: string
        name: option
        optional: true
        mapping:
          - dps_val: mode_1
            value: Scene 1
          - dps_val: mode_2
            value: Scene 2
          - dps_val: mode_3
            value: Scene 3
          - dps_val: mode_4
            value: Scene 4
          - dps_val: mode_5
            value: Scene 5
          - dps_val: mode_6
            value: Scene 6
          - dps_val: mode_7
            value: Scene 7
          - dps_val: mode_8
            value: Scene 8

  - entity: light
    translation_key: display
    category: config
    dps:
      - id: 22
        name: brightness
        type: integer
        optional: true
        range:
          min: 0
          max: 100

  - entity: select
    name: Time format
    translation_key: timer
    category: config
    dps:
      - id: 21
        name: option
        type: string
        mapping:
          - dps_val: 12h
            value: 12h
            icon: "mdi:hours-12"
          - dps_val: 24h
            value: 24h
            icon: "mdi:hours-24"

  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 101
        name: lock
        type: boolean

  - entity: time
    translation_key: timer
    category: config
    dps:
      - id: 20
        type: integer
        optional: true
        name: minute
        range:
          min: 0
          max: 1439

  - entity: sensor
    translation_key: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 104
        name: sensor
        type: integer
        unit: "s"
