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.

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