Files
esphome/athom-rgbct-light.yaml
2025-02-12 14:56:07 -05:00

97 lines
1.8 KiB
YAML

substitutions:
name: athom-rgbct-light
friendly_name: "Athom RGBCT Light"
light_restore_mode: ALWAYS_OFF
external_components:
- source:
type: git
url: https://github.com/KaufHA/common
components: [ ddp ]
refresh: always
packages:
athom.rgbct-light: github://cb513/athom-configs/athom-rgbct-light.yaml
esphome:
name: ${name}
name_add_mac_suffix: true
build_path: /tmp/esphome
esp8266:
restore_from_flash: false
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
reboot_timeout: 0s
api:
encryption:
key: !secret encryption_key
reboot_timeout: 0s
debug:
ddp:
web_server: !remove
logger:
level: debug
light:
- id: !extend rgbct_light
name: ' '
default_transition_length: 0s
effects:
- ddp:
name: DDP
timeout: 10s
disable_gamma: true
brightness_scaling: none
time:
- id: !remove sntp_time
- platform: homeassistant
id: hass_time
on_time_sync:
then:
- if:
condition:
lambda: 'return id(device_last_restart).state == "";'
then:
- text_sensor.template.publish:
id: device_last_restart
state: !lambda '
char str[21];
time_t currTime = id(hass_time).now().timestamp;
strftime(str, sizeof(str), "%Y-%m-%dT%H:%M:%SZ", gmtime(&currTime));
return str;'
text_sensor:
- id: !remove uptime_template
- platform: debug
reset_reason:
name: "Reset Reason"
- platform: template
id: !extend device_last_restart
device_class: timestamp
sensor:
- platform: uptime
id: !remove uptime_sensor
- platform: copy
id: !remove wifi_signal_percent
- platform: wifi_signal
id: !extend wifi_signal_db
name: "WiFi Signal"