Created
December 7, 2022 16:53
-
-
Save oki/c5ed412d07527f6086c4fe2a93558ab2 to your computer and use it in GitHub Desktop.
Momentary switch configuration for light and iTL-16-20-230 16A 2NO 230VAC/110VDC Acti9 A9C30812 Schneider relay
This file contains hidden or 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
mqtt: | |
discovery: true | |
broker: localhost | |
username: xxx | |
password: xxx | |
port: xxx | |
birth_message: | |
topic: 'hass/status' | |
payload: 'online' | |
will_message: | |
topic: 'hass/status' | |
payload: 'offline' | |
light: | |
- schema: template | |
unique_id: light.work1 | |
name: "Work 1" | |
state_topic: "boneio1/binary_sensor/in_12/state" | |
state_template: "{{ value|lower }}" | |
command_topic: "boneio1/switch/relay_20/command" | |
command_on_template: "TOGGLE" | |
command_off_template: "TOGGLE" | |
retain: false |
This file contains hidden or 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
- platform: gpio | |
id: relay_20 | |
name: "Relay_20" | |
pin: | |
pcf8574: pcf_1 | |
# Use pin number 12 | |
number: 3 | |
mode: | |
output: true | |
inverted: true | |
on_turn_on: | |
- delay: 200ms | |
- switch.turn_off: relay_20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment