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.

121 lines
3.6 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. esp32:
  25. board: esp32doit-devkit-v1
  26. framework:
  27. type: esp-idf
  28. sdkconfig_options:
  29. CONFIG_FREERTOS_UNICORE: y
  30. advanced:
  31. ignore_efuse_mac_crc: true
  32. version: 4.3.2
  33. source: ~3.40302.0
  34. platform_version: platformio/espressif32 @ 3.5.0
  35. # Retrieve the code for the xiaomi_bslamp2 platform from a local clone
  36. # of the github repository, one directory up from the config file.
  37. external_components:
  38. - source:
  39. type: local
  40. path: ../esphome-xiaomi_bslamp2/components
  41. # Disable the reboot timeout. By default, the lamp reboots after 15
  42. # minutes without any client connections (e.g. when home assistant is off
  43. # line, or when the WiFi is broken). Reboots are annoying though, because
  44. # the RGBWW LEDs will turn off during the reboot, causing the light to
  45. # flicker.
  46. api:
  47. reboot_timeout: 0s
  48. # The log level can be raised when needed for debugging the firmware. For
  49. # production, a low log level is recommended. Mainly because high volume log
  50. # output might interfere with the API/WiFi connection stability. So when
  51. # raising the log level, beware that you might see dropped connections from
  52. # Home Assistant and the network log viewer.
  53. logger:
  54. level: INFO
  55. # ----------------------------------------------------------------------
  56. # Hardware setup
  57. # ----------------------------------------------------------------------
  58. i2c:
  59. id: front_panel_i2c
  60. sda: GPIO21
  61. scl: GPIO19
  62. scan: true
  63. output:
  64. - platform: ledc
  65. id: output_red
  66. pin: GPIO13
  67. frequency: 3000
  68. channel: 0
  69. - platform: ledc
  70. id: output_green
  71. pin: GPIO14
  72. frequency: 3000
  73. channel: 1
  74. - platform: ledc
  75. id: output_blue
  76. pin: GPIO5
  77. frequency: 3000
  78. channel: 2
  79. - platform: ledc
  80. id: output_white
  81. pin: GPIO12
  82. frequency: 10000
  83. channel: 4
  84. - platform: gpio
  85. id: output_master1
  86. pin: GPIO33
  87. - platform: gpio
  88. id: output_master2
  89. pin:
  90. number: GPIO4
  91. mode: OUTPUT
  92. # This float output can be used to control the front panel illumination +
  93. # level indicator LEDs. Value 0.0 turns off the illumination. Other values
  94. # (up to 1.0) turn on the illumination and set the level indicator to the
  95. # requested level.
  96. - platform: xiaomi_bslamp2
  97. id: my_front_panel_illumination
  98. xiaomi_bslamp2:
  99. light:
  100. red: output_red
  101. green: output_green
  102. blue: output_blue
  103. white: output_white
  104. master1: output_master1
  105. master2: output_master2
  106. front_panel:
  107. i2c: front_panel_i2c
  108. address: 0x2C
  109. trigger_pin: GPIO16