WIP disable wi-fi to avoid interferences

This commit is contained in:
2026-02-07 13:16:23 +01:00
parent 28f8153c0e
commit 4b49539b3c

View File

@@ -1,5 +1,14 @@
# NOTE: This program does NOT log via UART, but only via network socket (esphome logs...)
# Variables
globals:
# The ESP8266 Wi-fi interferes with the NFC reader, for this reason is usually
# disabled. When the devices is turned on with the "volume up" key pressed, it
# enables the wifi. Used for firmware update, home assistant control and as a night light.
- id: wifi_mode
type: bool
restore_value: no
initial_value: False
# ---------------------- Global config ----------------------
@@ -8,13 +17,20 @@ esphome:
on_boot:
- priority: 300
then:
- if:
condition:
binary_sensor.is_on: vol_up
then: !lambda id(wifi_mode) = true;
#else:
# then:
# wifi.disable:
- dfplayer.set_volume: 10
- light.turn_on:
id: status_led
brightness: 60%
red: 80%
green: 0%
blue: 100%
id: status_led
brightness: !lambda if (id(wifi_mode)) return 1.0; else return 0.6;
red: 0.8
green: !lambda if (id(wifi_mode)) return 1.0; else return 0.0;
blue: 1.0
esp8266:
board: d1_mini_lite
@@ -30,6 +46,7 @@ ota:
wifi:
ssid: "Pew"
password: "SediaChinita@Terrazzo2017"
reboot_timeout: 0s
# ---------------------- Global variables ----------------------
@@ -247,6 +264,7 @@ api:
# "folder": 2,
# "file": 1
# }
reboot_timeout: 0s
actions:
- action: dfplayer_next