56 lines
		
	
	
		
			955 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			56 lines
		
	
	
		
			955 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| esphome:
 | |
|   name: desk-lamp
 | |
|   friendly_name: Desk Lamp
 | |
| 
 | |
| bk72xx:
 | |
|   board: generic-bk7231t-qfn32-tuya
 | |
| 
 | |
| # Enable logging
 | |
| logger:
 | |
| 
 | |
| # Enable Home Assistant API
 | |
| api:
 | |
|   encryption:
 | |
|     key: "6+mIYZv8QSpHXcH9FOJ2lLrFA2nO3XlPjycnon5PWi8="
 | |
| 
 | |
| ota:
 | |
|   platform: esphome
 | |
|   password: !secret ota
 | |
| 
 | |
| web_server:
 | |
| 
 | |
| captive_portal:
 | |
| 
 | |
| mdns:
 | |
| 
 | |
| wifi:
 | |
|   ssid: !secret wifi_ssid
 | |
|   password: !secret wifi_password
 | |
|   ap:
 | |
| 
 | |
| text_sensor:
 | |
|   - platform: libretiny
 | |
|     version:
 | |
|       name: LibreTiny Version
 | |
| 
 | |
| output:
 | |
|   - platform: libretiny_pwm
 | |
|     id: output_cold
 | |
|     pin: P26
 | |
|     max_power: 70%  # Limit the cold white channel to 80%
 | |
|     min_power: 14%
 | |
|   - platform: libretiny_pwm
 | |
|     id: output_warm
 | |
|     pin: P24
 | |
|     max_power: 70%  # Limit the warm white channel to 80%
 | |
|     min_power: 14%
 | |
| 
 | |
| light:
 | |
|   - platform: cwww
 | |
|     id: light_cwww
 | |
|     name: Light
 | |
|     cold_white_color_temperature: 6500 K
 | |
|     warm_white_color_temperature: 2700 K
 | |
|     cold_white: output_cold
 | |
|     warm_white: output_warm
 |