I am able to control covers from home assistant but not with buttons. This should clearly work and I have checked that the voltage goes to the S1 or S2 inputs when the appropriate button is pressed.
Beiträge von TheUserNotWhat
-
-
In my case all was working but stopped once I flashed esphome firmware. Any idea why wouldnt this work?
Code
Alles anzeigenesphome: name: roleta-loznice friendly_name: Roleta Loznice esp32: board: esp32doit-devkit-v1 framework: type: arduino # Enable logging logger: # Enable Home Assistant API api: web_server: port: 80 sensor: - platform: wifi_signal name: Shelly Roleta Loznice Wifi Signal Strength update_interval: 60s - platform: uptime name: Shelly Roleta Loznice Uptime wifi: ssid: !secret wifi_ssid password: !secret wifi_password # Enable fallback hotspot (captive portal) in case wifi connection fails manual_ip: static_ip: 192.168.1.235 gateway: 192.168.1.1 subnet: 255.255.255.0 captive_portal: cover: - platform: time_based name: "Roleta loznice" id: cover1 open_action: - switch.turn_on: relay1 open_duration: 21000ms close_action: - switch.turn_on: relay2 close_duration: 21000ms stop_action: - switch.turn_off: relay1 - switch.turn_off: relay2 binary_sensor: - id: key1 platform: gpio pin: number: GPIO18 mode: input: true pullup: true inverted: true on_press: then: - cover.open: cover1 on_release: then: - cover.stop: cover1 - id: key2 platform: gpio pin: number: GPIO05 mode: input: true pullup: true inverted: true on_press: then: - cover.close: cover1 on_release: then: - cover.stop: cover1 switch: - platform: gpio name: "Roleta loznice 1" pin: GPIO12 id: relay1 icon: "mdi:electric-switch" restore_mode: RESTORE_DEFAULT_OFF interlock: [relay2] - platform: gpio name: "Roleta loznice 1" pin: GPIO13 id: relay2 icon: "mdi:electric-switch" restore_mode: RESTORE_DEFAULT_OFF interlock: [relay1]