I have recently added two Xiaomi Mijia (LYWSD03MMC) temperature/humidity sensors to Homeassistant via Esphome. I followed instructions Here:
and
The sensors were flashed with ATC_MiThermometer-master.bin using Teelin Flasher.
The following Yaml file was generated in Esphome and flashed to a new esp32
temphumi1.yaml
substitutions:
esphome_name: temphumi1
esphome:
name: ${esphome_name}
platform: ESP32
board: esp-wrover-kit
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "50241c66c0f25571a65da6c989a6fa0b"
wifi:
ssid: "*******"
password: "*********"
# domain: .****
# Optional manual IP
manual_ip:
static_ip: 192.168.0.207
gateway: 192.168.0.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
# ap:
# ssid: "Temphumi1 Fallback Hotspot"
# password: "uac78awPoBZz"
captive_portal:
time:
- platform: homeassistant
esp32_ble_tracker:
switch:
- platform: gpio
name: “${esphome_name}-Onboard-LED”
pin: 2
inverted: True
- platform: restart
name: ${esphome_name} -restart
id: restart_switch
sensor:
- platform: uptime
name: “${esphome_name}_Uptime Sensor”
- platform: wifi_signal
name: “${esphome_name} WiFi Signal”
update_interval: 60s
- platform: xiaomi_lywsd03mmc
mac_address: A4:C1:38:73:26:04
bindkey: "A1101A63CDAF068EF5B9FDA5155314B1"
temperature:
name: "1 Temperature"
humidity:
name: "1 Humidity"
battery_level:
name: "MiniVideoTemp Battery Level"
- platform: xiaomi_lywsd03mmc
mac_address: A4:C1:38:D9:D6:37
bindkey: "fdf3c69bdb487f790370c82e0e8fb74e"
temperature:
name: "2 Temperature"
humidity:
name: "2 Humidity"
battery_level:
name: "MiniVideoTemp Battery Level"
The device does show in Integrations and is pingable from another nwtwork PC.
temphumi1
ESPHome
1 device and 9 entities
Device temphumi1
Manufacturer espressif
Model ESP-WROVER-KIT
Area Living Room
Integration ESPHome
Battery 80 %
The selected entities are:
Name
Entity ID
Integration
Area
Status
${display_name} Humi
sensor.display_name_humi
ESPHome
${display_name} Pres
sensor.display_name_pres
ESPHome
${display_name} Temp
sensor.display_name_temp
ESPHome
However the status of all three entities is “unavaillable”
The whole sytem and all components have been restarted several times with no effect.
In addition, some other unrelated sensors (mainly switches on a multi outlet powwer strip are now “unavailable” although they were working fine previously.
The states on the Developer Tools page appears to show informations that indicates the sensors are working normally:
sensor.1_humidity
1 Humidity
41 state_class: measurement
unit_of_measurement: %
friendly_name: 1 Humidity
device_class: humidity
sensor.1_temperature
1 Temperature
80.6 state_class: measurement
unit_of_measurement: °F
friendly_name: 1 Temperature
device_class: temperature
sensor.2_humidity
2 Humidity
40 state_class: measurement
unit_of_measurement: %
friendly_name: 2 Humidity
device_class: humidity
sensor.2_temperature
2 Temperature
80.6 state_class: measurement
unit_of_measurement: °F
friendly_name: 2 Temperature
device_class: temperature
I am hoping others have solved this problem.
Thanks for Preformatted text
your time.
Kerry