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.
|
|
|
<<: !include secrets.yaml
|
|
|
|
|
|
|
|
esphome:
|
|
|
|
name: lugsaar_esphome_blaue_lichterkette
|
|
|
|
platform: ESP8266
|
|
|
|
board: d1_mini
|
|
|
|
|
|
|
|
wifi:
|
|
|
|
ssid: $wifi_ssid
|
|
|
|
password: $wifi_password
|
|
|
|
|
|
|
|
ota:
|
|
|
|
password: $ota_password
|
|
|
|
|
|
|
|
mqtt:
|
|
|
|
broker: $mqtt_host
|
|
|
|
port: $mqtt_port
|
|
|
|
username: $mqtt_user
|
|
|
|
password: $mqtt_password
|
|
|
|
client_id: lugsaar_esphome_blaue_lichterkette
|
|
|
|
topic_prefix: licht
|
|
|
|
|
|
|
|
output:
|
|
|
|
- platform: esp8266_pwm
|
|
|
|
pin: GPIO04
|
|
|
|
frequency: 1000 Hz
|
|
|
|
id: pwm_output
|
|
|
|
|
|
|
|
light:
|
|
|
|
- platform: monochromatic
|
|
|
|
output: pwm_output
|
|
|
|
name: "Blaue Lichterkette"
|
|
|
|
id: blaue_lichterkette
|
|
|
|
effects:
|
|
|
|
- lambda:
|
|
|
|
name: "My Random Lambda Effect with Randomness"
|
|
|
|
update_interval: 3s
|
|
|
|
lambda: |-
|
|
|
|
auto call = id(blaue_lichterkette).turn_on();
|
|
|
|
call.set_transition_length(3000);
|
|
|
|
call.set_brightness(0.5 + random_float() * 0.5);
|
|
|
|
call.perform();
|
|
|
|
- lambda:
|
|
|
|
name: "My Jumpy Random Lambda Effect with Fast Randomness"
|
|
|
|
update_interval: 0.5s
|
|
|
|
lambda: |-
|
|
|
|
auto call = id(blaue_lichterkette).turn_on();
|
|
|
|
call.set_transition_length(200);
|
|
|
|
call.set_brightness(0.3 + random_float() * 0.7);
|
|
|
|
call.perform();
|
|
|
|
|
|
|
|
binary_sensor:
|
|
|
|
- platform: gpio
|
|
|
|
pin:
|
|
|
|
number: GPIO05
|
|
|
|
mode: INPUT_PULLUP
|
|
|
|
id: switch_blaue_lichterkette
|
|
|
|
on_press:
|
|
|
|
then:
|
|
|
|
light.toggle:
|
|
|
|
id: blaue_lichterkette
|
|
|
|
on_release:
|
|
|
|
then:
|
|
|
|
light.toggle:
|
|
|
|
id: blaue_lichterkette
|