Shelly Dimmer 2 an einem Standard Lichtschalter betreiben mit ESPHome
Danke Felix für diesen Code
configuration.yaml
1esphome:
2 name: esszimmerlicht
3
4esp8266:
5 board: esp01_1m
6
7# Enable logging
8logger:
9
10# Enable Home Assistant API
11api:
12
13ota:
14 password: "52ff9510bfff9248629c0ec7f460b8b2"
15
16wifi:
17 ssid: !secret wifi_ssid
18 password: !secret wifi_password
19
20 # Enable fallback hotspot (captive portal) in case wifi connection fails
21 ap:
22 ssid: "Esszimmer Fallback Hotspot"
23 password: "dKQbQ4sGASAu"
24
25web_server:
26 port: 80
27
28captive_portal:
29
30
31
32uart:
33 tx_pin: 1
34 rx_pin: 3
35 baud_rate: 115200
36sensor:
37
38light:
39 - platform: shelly_dimmer
40 name: Esszimmer Licht
41 id: thislight
42 power:
43 name: Esszimmer Licht Power
44 voltage:
45 name: Esszimmer Licht Voltage
46 current:
47 name: Esszimmer Licht Current
48 min_brightness: 260
49 max_brightness: 1000
50 firmware:
51 version: "51.6"
52 update: true
53
54
55binary_sensor:
56
57 - platform: gpio
58 pin:
59 number: GPIO14
60 name: "Esszimmerlicht"
61 on_state:
62 then:
63 - light.toggle: thislight
64 internal: true
65 id: switchid
