Jsem v tomto úplně nováček. Potřeboval bych přes příkaz MQTT zapnout příkaz třeba tlačítko dolu a nebo nahoru. Potřebuji tento příkaz zadat do LOXONE přes virtuální výstup. a nebo HTTP příkaz pro zapnutí povelu.
Předem děkuji za vyřešení mého problému.
Zkopírovaní kód od ( https://sprut.ai/client/article/4381 )
Kód: Vybrat vše
esphome:
name: ovladac
platform: ESP8266
board: d1_mini
wifi:
ssid: "*****"
password: "*******"
logger:
api:
ota:
switch:
- platform: gpio
id: down
pin: D8
inverted: yes
- platform: gpio
id: stop
pin: D7
inverted: yes
- platform: gpio
id: up
pin: D6
inverted: yes
- platform: template
name: "Zaluzie nahoru"
icon: "mdi:arrow-up-bold-circle-outline"
turn_on_action:
- switch.turn_on: up
- delay: 200ms
- switch.turn_off: up
- delay: 500ms
- switch.turn_on: up
- delay: 200ms
- switch.turn_off: up
- delay: 500ms
- switch.turn_on: up
- delay: 200ms
- switch.turn_off: up
- platform: template
name: "Zaluzie stop"
icon: "mdi:stop-circle-outline"
turn_on_action:
- switch.turn_on: stop
- delay: 200ms
- switch.turn_off: stop
- delay: 100ms
- switch.turn_on: stop
- delay: 200ms
- switch.turn_off: stop
- delay: 100ms
- switch.turn_on: stop
- delay: 200ms
- switch.turn_off: stop
- platform: template
name: "Zaluzie dolu"
icon: "mdi:arrow-down-bold-circle-outline"
turn_on_action:
- switch.turn_on: down
- delay: 200ms
- switch.turn_off: down
- delay: 500ms
- switch.turn_on: down
- delay: 200ms
- switch.turn_off: down
- delay: 500ms
- switch.turn_on: down
- delay: 200ms
- switch.turn_off: down
# Example configuration entry
web_server:
port: 80
# Example configuration entry
mqtt:
broker: 192.168.**.***
username: loxberry
password: ******