generated from esphome/esphome-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShellyPlugS-for-ESPHome-legacy.yaml
77 lines (65 loc) · 1.67 KB
/
ShellyPlugS-for-ESPHome-legacy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# These substitutions allow the end user to override certain values
substitutions:
devicename: "shelly-1"
is_button: "false"
esphome:
platform: ESP8266
board: esp01_1m
name: ${devicename}
# Automatically add the mac address to the name
# so you can use a single firmware for all devices
name_add_mac_suffix: true
# This will allow for (future) project identification,
# configuration and updates.
project:
name: Arvernus.Shelly-1
version: "1.0"
# To be able to get logs from the device via serial and api.
logger:
# API is a requirement of the dashboard import.
api:
# OTA is required for Over-the-Air updating
ota:
# This should point to the public location of this yaml file.
dashboard_import:
package_import_url: github://Arvernus/Shelly-for-ESPHome/Shelly1-for-ESPHome.yaml
wifi:
# Set up a wifi access point
ap:
password: "12345678"
# In combination with the `ap` this allows the user
# to provision wifi credentials to the device.
captive_portal:
# Sets up the improv via serial client for Wi-Fi provisioning
improv_serial:
time:
- platform: sntp
id: sntp_time
switch:
- platform: gpio
pin: GPIO4
id: shelly_relay
binary_sensor:
- platform: gpio
internal: true
pin:
number: GPIO5
# small delay to prevent debouncing
filters:
- delayed_on_off: 50ms
# config for state change of input button
on_state:
if:
condition:
lambda: |-
return !${is_button};
then:
switch.toggle: shelly_relay
on_click:
if:
condition:
lambda: |-
return ${is_button};
then:
switch.toggle: shelly_relay
id: button