Created
December 19, 2021 10:57
-
-
Save duffyd/9ce089b019ff66a6a84ec087e1cdca37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: d1mini-1 | |
esp8266: | |
board: d1_mini | |
# Enable logging | |
logger: | |
level: VERY_VERBOSE | |
# Enable Home Assistant API | |
api: | |
services: | |
- service: control_servo | |
variables: | |
level: float | |
then: | |
- servo.write: | |
id: my_servo | |
level: !lambda 'return level / 100.0;' | |
ota: | |
password: [hidden] | |
wifi: | |
ssid: !secret wifi_ssid | |
password: !secret wifi_password | |
manual_ip: | |
static_ip: [hidden] | |
gateway: [hidden] | |
subnet: [hidden] | |
# Enable fallback hotspot (captive portal) in case wifi connection fails | |
ap: | |
ssid: "D1Mini-1 Fallback Hotspot" | |
password: [hidden] | |
captive_portal: | |
servo: | |
- id: my_servo | |
output: pwm_output | |
output: | |
- platform: esp8266_pwm | |
id: pwm_output | |
pin: D4 | |
frequency: 50 Hz | |
min_power: 5.0% # 5% at 50Hz is 1mS (20mS cycles) | |
max_power: 10.0% # 10% at 50Hz is 2mS (20mS cycles) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment