I am in the process of migrating from Domoticz to HA and most has been going well but I have come unstuck with my Sonoff TH16.
using ESPHome I have flashed all devices and have them all showing in HA.
all 4 are using the same code… this one works :
esphome:
name: downstairs
platform: ESP8266
board: esp01_1m
wifi:
ssid: ###
password:###
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ###
password: ###
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
#Outputs
output:
switch:
- platform: gpio
pin: GPIO12
name: "downstairs"
id: downstairs_relay
binary_sensor:
- platform: gpio
pin:
number: GPIO0
inverted: True
id: downstairs_relay_button
on_press:
then:
- switch.toggle: downstairs_relay
sensor:
- platform: dht
model: si7021
pin: GPIO14
humidity:
name: "Downstairs Humidity"
on_value_range:
- above: 90.0
then:
- switch.turn_on: downstairs_relay
- below: 90.0
then:
- switch.turn_off: downstairs_relay
temperature:
name: "Downstairs Temperature"
update_interval: 10s
this one errors out “Invalid readings! Please check your wiring (pull-up resistor, pin number)”
esphome:
name: bathroom_fan
platform: ESP8266
board: esp01_1m
wifi:
ssid: ###
password: ###
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ###
password: ###
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
#Outputs
output:
switch:
- platform: gpio
pin: GPIO12
name: "Bathroom Fan"
id: bathroom_fan_relay
binary_sensor:
- platform: gpio
pin:
number: GPIO0
inverted: True
id: bathroom_fan_relay_button
on_press:
then:
- switch.toggle: bathroom_fan_relay
sensor:
- platform: dht
model: si7021
pin: GPIO14
humidity:
name: "Bathroom Humidity"
on_value_range:
- above: 90.0
then:
- switch.turn_on: bathroom_fan_relay
- below: 90.0
then:
- switch.turn_off: bathroom_fan_relay
temperature:
name: "Bathroom Temperature"
update_interval: 10s
so the devices are configured with a built in 5k pullup to GPIO14
while I am sure it must be something daft I have done I have run out of ideas. can anyone help?