Thanks for the tip.
Sorry to necro, but has anyone got this working with a Binary light? Specifically I want a light that blinks while it is turned on, but I can turn it off. I can see that
- Pulse doesnt work with binary light
- Strobe effect seems broken on binary light
- The slow_pwm approach doesnt work for me at all, it is just on.
- The interval approach doesnt seem to have a way to turn it on or off…
Hi,
Anyone can help me to traslate this
irsend.mark(1000);
Irsend.space(1000);
To
esphome:
name: wemosswitch
platform: ESP8266
board: d1_mini
#For blinking the greenLED
on_boot:
priority: -100
then:
- output.turn_on:
my_slow_pwm
- output.set_level:
id: my_slow_pwm
level: "50%"
output:
platform: slow_pwm
pin: D3
id: my_slow_pwm
period: 1000ms
Regards
esphome:
name: capteur-lumiere
friendly_name: Capteur Lumière
platform: ESP8266
board: d1_mini
on_boot:
priority: -100
then:
- output.turn_on:
my_slow_pwm
- output.set_level:
id: my_slow_pwm
level: "50%"
output:
platform: slow_pwm
pin: GPIO2
id: my_slow_pwm
period: 1000ms
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "jb+VhPzw4jcnk39tggF1zs1saWQF1h2r0+J16Tla/mM="
ota:
password: "ba9ea2bb85379b7b4d61bec42747202e"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 10.10.10.190
gateway: 10.10.10.1
subnet: 255.255.255.0
dns1: 10.10.10.1
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Capteur-Lumiere Fallback Hotspot"
password: "01234567"
captive_portal:
i2c:
sda: GPIO4
scl: GPIO5
scan: True
switch:
- platform: restart
name: Reboot Capteur de Lumière
sensor:
- platform: bh1750
name: "Capteur de lumière"
address : 0x23
update_interval : 20 s
- platform: uptime
name: En marche depuis
id: uptime_sensor_days
update_interval: 60s
on_raw_value:
then:
- text_sensor.template.publish:
id: uptime_human
state: !lambda |-
int seconds = round(id(uptime_sensor_days).raw_state);
int days = seconds / (24 * 3600);
seconds = seconds % (24 * 3600);
int hours = seconds / 3600;
seconds = seconds % 3600;
int minutes = seconds / 60;
seconds = seconds % 60;
return (
(days ? String(days) + "d " : "") +
(hours ? String(hours) + "h " : "") +
(minutes ? String(minutes) + "m " : "") +
(String(seconds) + "s")
).c_str();
time:
- platform: homeassistant
id: homeassistant_time
text_sensor:
- platform: version
name: Version
- platform: wifi_info
ip_address:
name: IP
bssid:
name: BSSID
ssid:
name: SSID
- platform: template
name: Dernier push
id: uptime_human
icon: mdi:clock-start