I have a sonoff basic. Previously it was used for controlling a ceiling light, now it’s used for controlling my soldering station.
For some reason some of the ‘old entities’ pops up on the new config.
I’ve removed it and readded it to HA, both via dns name and ip.
I’ve tried changing the ip.
The config looks like this:
substitutions:
device_name: soldering-station
# Higher value gives lower watt readout
current_res: '0.00302'
# Lower value gives lower voltage readout
voltage_div: '940'
device_description: "Controls Soldering station and fans"
esphome:
name: '${device_name}'
platform: ESP8266
board: esp8285
wifi:
ssid: !secret wifissid
password: !secret wifipw
reboot_timeout: 60min
manual_ip:
static_ip: 10.11.13.74
gateway: 10.11.13.1
subnet: 255.255.255.0
# use_address: 10.11.13.95
fast_connect: true
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${device_name} Hotspot"
password: !secret appw
logger:
baud_rate: 0
#web_server:
# port: 80
# auth:
# username: !secret webuser
# password: !secret webpw
api:
password: !secret apipw
# encryption:
# key: !secret encryption
ota:
password: !secret otapw
time:
- platform: homeassistant
id: homeassistant_time
text_sensor:
- platform: version
name: "${device_name} ESPHome Version"
- platform: wifi_info
ip_address:
name: "${device_name} ip"
ssid:
name: "${device_name} ssid"
binary_sensor:
- platform: gpio
id: push_button
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
internal: true
on_press:
if:
condition:
- switch.is_off: relay
then:
- switch.turn_on: blue_led
- switch.turn_on: relay
else:
- switch.turn_off: relay
switch:
- platform: gpio
name: "${device_name} relay"
pin: GPIO12
id: relay
on_turn_off:
if:
condition:
- switch.is_on: blue_led
then:
- switch.turn_off: blue_led
- platform: gpio
id: blue_led
pin:
number: GPIO13
inverted: True
sensor:
- platform: wifi_signal
name: '${device_name} wifi signal'
update_interval: 60s
accuracy_decimals: 0
- platform: uptime
name: '${device_name} uptime'
unit_of_measurement: days
update_interval: 300s
accuracy_decimals: 1
filters:
- multiply: 0.000011574
In HA it looks like this:
I also tried editing core.entity_registry where I found the ghost devices that are under the device_id, and removed them, but they just came back after a reboot?