| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- substitutions:
- devicename: gf-office-rgb-02
- low_devicename: gf_office_rgb_02
- friendly_devicename: GF Office RGB Light 02
- esphome:
- name: $devicename
- friendly_name: ${friendly_devicename}
- platformio_options:
- lib_ignore:
- - RPAsyncTCP
- bk72xx:
- board: generic-bk7231t-qfn32-tuya
- packages:
- # Enable Home Assistant API
- esphome: !include common/keys.yaml
- diag: !include common/diag.yaml
- # Enable logging
- logger:
- web_server:
- port: 80
-
- wifi:
- ssid: !secret iot_ssid
- password: !secret iot_password
- domain: .int.mmax.cloud
- text_sensor:
- # - platform: debug
- # reset_reason:
- # name: Reset Reason
- - platform: libretiny
- version:
- name: LibreTiny Version
- bp5758d:
- clock_pin: P24
- data_pin: P26
- #output:
- # - platform: bp5758d
- # id: output_red
- # channel: 3
- # current: 14
- # - platform: bp5758d
- # id: output_green
- # channel: 2
- # current: 14
- # - platform: bp5758d
- # id: output_blue
- # channel: 1
- # current: 14
- # - platform: bp5758d
- # id: output_cold
- # channel: 5
- # current: 29
- # - platform: bp5758d
- # id: output_warm
- # channel: 4
- # current: 29
- output:
- - platform: bp5758d
- id: output_red
- channel: 2
- current: 14
- - platform: bp5758d
- id: output_green
- channel: 1
- current: 14
- - platform: bp5758d
- id: output_blue
- channel: 3
- current: 14
- - platform: bp5758d
- id: output_cold_white
- channel: 5
- current: 29
- - platform: bp5758d
- id: output_warm_white
- channel: 4
- current: 29
- #light:
- # - platform: rgbww
- # id: light_rgbww
- # name: "light"
- # color_interlock: true
- # cold_white_color_temperature: 6500 K
- # warm_white_color_temperature: 2700 K
- # red: output_red
- # green: output_green
- # blue: output_blue
- # cold_white: output_cold
- # warm_white: output_warm
- # restore_mode: RESTORE_AND_ON
- # effects:
- # - random:
- # - strobe:
- # - flicker:
- # alpha: 50% #The percentage that the last color value should affect the light. More or less the “forget-factor” of an exponential moving average. Defaults to 95%.
- # intensity: 50%
- light:
- - platform: rgbww
- name: ${friendly_devicename}
- id: the_light
- restore_mode: RESTORE_DEFAULT_ON
- red: output_red
- green: output_green
- blue: output_blue
- cold_white: output_cold_white
- warm_white: output_warm_white
- cold_white_color_temperature: 6500 K
- warm_white_color_temperature: 2700 K
- color_interlock: true
- constant_brightness: true
- effects:
- - random:
- name: "Slow Random"
- transition_length: 30s
- update_interval: 30s
- - random:
- name: "Fast Random"
- transition_length: 4s
- update_interval: 5s
- - strobe:
- - flicker:
- alpha: 50% #The percentage that the last color value should affect the light. More or less the “forget-factor” of an exponential moving average. Defaults to 95%.
- intensity: 50% #The intensity of the flickering, basically the maximum amplitude of the random offsets. Defaults to 1.5%.
- - lambda:
- name: Throb
- update_interval: 1s
- lambda: |-
- static int state = 0;
- auto call = id(the_light).turn_on();
- // Transtion of 1000ms = 1s
- call.set_transition_length(1000);
- if (state == 0) {
- call.set_brightness(1.0);
- } else {
- call.set_brightness(0.01);
- }
- call.perform();
- state += 1;
- if (state == 2)
- state = 0;
|