esphome-configs/spacestate-djo.yaml
2024-09-29 20:50:38 +02:00

60 lines
1 KiB
YAML

esphome:
name: spacestate-djo
esp32:
board: esp32thing
framework:
type: arduino
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ota:
platform: esphome
password: !secret ota_password
logger:
mqtt:
broker: !secret mqtt_server
text_sensor:
- platform: version
name: "ESPHome Version"
hide_timestamp: true
state_topic: bitlair/esphome/spacestate-djo/version
sensor:
- platform: wifi_signal
name: "WiFi Signal dB"
update_interval: 10s
state_topic: bitlair/esphome/spacestate-djo/wifi_signal
retain: false
binary_sensor:
- platform: gpio
name: "DJO State"
id: switch_djo
state_topic: bitlair/switch/state/djo
pin:
number: 23
mode: INPUT_PULLUP
inverted: true
on_press:
then:
- light.turn_on: led_djo
on_release:
then:
- light.turn_off: led_djo
output:
- platform: gpio
pin: 18
id: o_led_djo
light:
- platform: binary
id: led_djo
name: "DJO Led"
output: o_led_djo