uart:
baud_rate: 9600
tx_pin: GPIO0
switch:
- platform: uart
name: "open"
id: cover_open
data: [0x55,0x00,0x00,0x03,0x01,0x01,0xd3,0x1d]
- platform: uart
name: "closed"
id: cover_closed
data: [0x55,0x00,0x00,0x03,0x01,0x02,0xd2,0x5d]
- platform: uart
name: "stop"
id: cover_pause
data: [0x55,0x00,0x00,0x03,0x01,0x03,0x12,0x9c]
- platform: uart
name: "reversal"
data: [0x55,0x00,0x00,0x03,0x01,0x07,0xd1,0x9d]
- platform: uart
name: "calibration"
data: [0x55,0x00,0x00,0x03,0x01,0x12,0x1e,0x5c]
- platform: uart
name: "status"
data: [0x55,0x00,0x00,0x03,0x01,0x0f,0x17,0x9c]
send_every: 1s
cover:
- platform: template
name: "my cover"
device_class: window
open_action:
- switch.turn_on: cover_open
close_action:
- switch.turn_on: cover_closed
stop_action:
- switch.turn_on: cover_pause
optimistic: true
assumed_state: true