From 249d9816899c0e5cf5ef04693098af93e87fd666 Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Thu, 11 Apr 2024 15:56:24 -0600 Subject: [PATCH] Adding bindicator --- bindicator.yaml | 101 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 bindicator.yaml diff --git a/bindicator.yaml b/bindicator.yaml new file mode 100644 index 0000000..bfcebda --- /dev/null +++ b/bindicator.yaml @@ -0,0 +1,101 @@ +esphome: + name: bindicator + +esp32: + board: esp32-c3-devkitm-1 + framework: + type: arduino + +logger: + level: INfO + baud_rate: 0 + +ota: + password: "bd2c004f2016fde90fbbb01706ad039a" + +wifi: + ssid: !secret ssid + password: !secret pass + +mqtt: + broker: mqtt.srv.jnf.me + username: esphome + password: esphome + topic_prefix: esphome/bindicator + +light: + - platform: neopixelbus + name: "Bindicator" + id: bindicator + variant: WS2812X + pin: 0 + num_leds: 2 + effects: + - lambda: + name: Pulsing + update_interval: 1s + lambda: |- + static int loopnum = 0; + auto call = id(bindicator).turn_on(); + call.set_brightness(1); + call.set_transition_length(1000); + + if (loopnum == 0) { + call.set_brightness(0.5); + } else if (loopnum == 1) { + call.set_brightness(1); + } + call.perform(); + loopnum++; + if (loopnum == 30) loopnum = 0; + - platform: partition + name: "Bindicator - Bottom" + id: bindicatorbottom + segments: + - id: bindicator + from: 0 + to: 0 + effects: + - lambda: + name: Pulsing + update_interval: 1s + lambda: |- + static int loopnum = 0; + auto call = id(bindicatorbottom).turn_on(); + call.set_brightness(1); + call.set_transition_length(1500); + + if (loopnum == 0) { + call.set_brightness(0.5); + } else if (loopnum == 1) { + call.set_brightness(1); + } + call.perform(); + loopnum++; + if (loopnum == 30) loopnum = 0; + + - platform: partition + name: "Bindicator - Top" + id: bindicatortop + segments: + - id: bindicator + from: 1 + to: 1 + effects: + - lambda: + name: Pulsing + update_interval: 1s + lambda: |- + static int loopnum = 0; + auto call = id(bindicatortop).turn_on(); + call.set_brightness(1); + call.set_transition_length(1500); + + if (loopnum == 0) { + call.set_brightness(0.5); + } else if (loopnum == 1) { + call.set_brightness(1); + } + call.perform(); + loopnum++; + if (loopnum == 30) loopnum = 0; \ No newline at end of file