substitutions:
  name: neo-siren
  friendly_name: Neo Siren

esphome:
  name: ${name}
  friendly_name: ${friendly_name}

esp8266:
  board: esp01_1m

logger:
  baud_rate: 0

api:
  encryption:
    key: !secret api_key

ota:
  - platform: esphome
    password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: "${friendly_name} Fallback"
    password: !secret wifi_password

captive_portal:

uart:
  tx_pin: GPIO1
  rx_pin: GPIO3
  baud_rate: 9600

tuya:

switch:
  - platform: tuya
    name: "Alarm"
    switch_datapoint: 104
    icon: "mdi:alarm-bell"

  - platform: tuya
    name: "Temperature Alarm"
    switch_datapoint: 113
    icon: "mdi:thermometer-alert"

  - platform: tuya
    name: "Humidity Alarm"
    switch_datapoint: 114
    icon: "mdi:water-percent-alert"

select:
  - platform: tuya
    name: "Alarm Sound"
    enum_datapoint: 102
    icon: "mdi:music-note"
    options:
      0: Doorbell
      1: Fur Elise
      2: Big Ben
      3: Ring Ring
      4: Lone Ranger
      5: Turkish March
      6: High Pitch Siren
      7: Red Alert
      8: Cricket
      9: Beep Beep
      10: Dogs
      11: Police
      12: Chime
      13: Phone Ring
      14: Firetruck
      15: Clock Chime
      16: Alarm Clock
      17: Psycho

number:
  - platform: tuya
    name: "Alarm Duration"
    number_datapoint: 103
    icon: "mdi:timer"
    min_value: 1
    max_value: 1800
    step: 1

  - platform: tuya
    name: "Alarm Volume"
    number_datapoint: 116
    icon: "mdi:volume-high"
    min_value: 0
    max_value: 2
    step: 1

sensor:
  - platform: tuya
    name: "Power Status"
    sensor_datapoint: 101
    icon: "mdi:power-plug"

  - platform: tuya
    name: "Temperature"
    sensor_datapoint: 105
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1
    icon: "mdi:thermometer"

  - platform: tuya
    name: "Humidity"
    sensor_datapoint: 106
    unit_of_measurement: "%"
    accuracy_decimals: 0
    icon: "mdi:water-percent"