You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
3.5 KiB

  1. # =========================================================================
  2. # *** If you are not developing the firmware, you can ignore this file ***
  3. #
  4. # This configuration package is used by Maurice for development purposes.
  5. # The main difference with the regular core.yaml package, is that the
  6. # source code for the bslamp2 component is not a remote GitHub repository,
  7. # but a local checkout of that repository.
  8. # ==========================================================================
  9. # --------------------------------------------------------------------------
  10. # Substitutions as used by the configuration packages
  11. # These can be overriden from the main device configuration file.
  12. # --------------------------------------------------------------------------
  13. substitutions:
  14. name: bedside-lamp
  15. friendly_name: Bedside Lamp
  16. light_name: ${friendly_name} RGBWW Light
  17. light_mode_text_sensor_name: ${friendly_name} Light Mode
  18. default_transition_length: 800ms
  19. # --------------------------------------------------------------------------
  20. # Core setup
  21. # --------------------------------------------------------------------------
  22. esphome:
  23. name: ${name}
  24. friendly_name: ${friendly_name}
  25. esp32:
  26. board: esp32doit-devkit-v1
  27. framework:
  28. type: esp-idf
  29. sdkconfig_options:
  30. CONFIG_FREERTOS_UNICORE: y
  31. advanced:
  32. ignore_efuse_mac_crc: true
  33. # Retrieve the code for the xiaomi_bslamp2 platform from a local clone
  34. # of the github repository, one directory up from the config file.
  35. external_components:
  36. - source:
  37. type: local
  38. path: ../esphome-xiaomi_bslamp2/components
  39. # Disable the reboot timeout. By default, the lamp reboots after 15
  40. # minutes without any client connections (e.g. when home assistant is off
  41. # line, or when the WiFi is broken). Reboots are annoying though, because
  42. # the RGBWW LEDs will turn off during the reboot, causing the light to
  43. # flicker.
  44. api:
  45. reboot_timeout: 0s
  46. # The log level can be raised when needed for debugging the firmware. For
  47. # production, a low log level is recommended. Mainly because high volume log
  48. # output might interfere with the API/WiFi connection stability. So when
  49. # raising the log level, beware that you might see dropped connections from
  50. # Home Assistant and the network log viewer.
  51. logger:
  52. level: INFO
  53. # ----------------------------------------------------------------------
  54. # Hardware setup
  55. # ----------------------------------------------------------------------
  56. i2c:
  57. id: front_panel_i2c
  58. sda: GPIO21
  59. scl: GPIO19
  60. scan: true
  61. output:
  62. - platform: ledc
  63. id: output_red
  64. pin: GPIO13
  65. frequency: 3000
  66. channel: 0
  67. - platform: ledc
  68. id: output_green
  69. pin: GPIO14
  70. frequency: 3000
  71. channel: 1
  72. - platform: ledc
  73. id: output_blue
  74. pin: GPIO5
  75. frequency: 3000
  76. channel: 2
  77. - platform: ledc
  78. id: output_white
  79. pin: GPIO12
  80. frequency: 10000
  81. channel: 4
  82. - platform: gpio
  83. id: output_master1
  84. pin: GPIO33
  85. - platform: gpio
  86. id: output_master2
  87. pin:
  88. number: GPIO4
  89. mode: OUTPUT
  90. # This float output can be used to control the front panel illumination +
  91. # level indicator LEDs. Value 0.0 turns off the illumination. Other values
  92. # (up to 1.0) turn on the illumination and set the level indicator to the
  93. # requested level.
  94. - platform: xiaomi_bslamp2
  95. id: my_front_panel_illumination
  96. xiaomi_bslamp2:
  97. light:
  98. red: output_red
  99. green: output_green
  100. blue: output_blue
  101. white: output_white
  102. master1: output_master1
  103. master2: output_master2
  104. front_panel:
  105. i2c: front_panel_i2c
  106. address: 0x2C
  107. trigger_pin: GPIO16