I have a problem with gpio p23 name Pulsante.
If set inverted true on boot turn on the relay but I set ALWAYS_OFF.
esphome:
name: uv_drink_water
friendly_name: UV Drink Water
bk72xx:
board: generic-bk7231n-qfn32-tuya
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
fast_connect: true
ap:
ssid: ${device_name}
password: !secret ap_password
logger:
web_server:
port: 80
auth:
username: admin
password: !secret web_server_password
time:
- platform: homeassistant
id: homeassistant_time
api:
encryption:
key: !secret api_encryption_key
ota:
password: !secret ota_password
switch:
- platform: gpio
id: relay
name: "Relay"
pin: P7
restore_mode: ALWAYS_OFF
binary_sensor:
- platform: gpio
pin:
number: P6
inverted: true
name: Sensore Di Flusso
id: sensore_di_flusso
filters:
- delayed_off: 2min
on_press:
then:
- switch.turn_on:
id: relay
on_release:
then:
- switch.turn_off:
id: relay
- platform: gpio
name: Pulsante
pin:
number: P23
inverted: true
on_click:
min_length: 50ms
max_length: 2s
then:
- switch.turn_on: relay