duffman
(Paul Duffill)
November 25, 2019, 6:44am
1
Hi,
Wondering if someone can help me.
I have Hassio installed on a Raspberry Pi. I have recently installed Esphome with the aim to use the Xiaomi BT sensors. (https://esphome.io/components/sensor/xiaomi_lywsdcgq.html )
This is working and I can see within the logs that the sensor is recieveing temperature, humidity & battery levels. I have done the integration within Hassio. However when I view the sensor states in developer tools the data is not there and all I see is “unkown”. This is also reflected into an display cards I create on the overview page. Am I suppose to do anything in the configuration.yaml?
This is my sensor .yaml file.
esphome:
name: esp321
platform: ESP32
board: mhetesp32devkit
wifi:
ssid: "SSID"
password: "SSID p/w"
#Optional manual IP
manual_ip:
static_ip: xxx.xxx.xxx.xxx
gateway: xxx.xxx.xxx.xxx
subnet: xxx.xxx.xxx.xxx
mqtt:
broker: 'hassio IP'
username: 'hassio user name'
password: 'password'
#Enable logging
logger:
#Enable Home Assistant API
api:
ota:
password: "ato password"
#Enable Bluetooth scanning for this ESP32
esp32_ble_tracker:
sensor:
- platform: xiaomi_lywsdcgq
mac_address: 'xx:xx:xx:xx:xx:xx'
temperature:
name: "Lounge Temperature"
humidity:
name: "Lounge Humidity"
battery_level:
name: "Lounge Battery Level"
Any ideas?
tom_l
November 25, 2019, 7:45am
2
Please edit your post and format it correctly. See point 11 here for how to: How to help us help you - or How to ask a good question
There is no need to obfuscate your static ip details. Local addresses are not routable over the internet.
Any reason you are using mqtt rather than the api?
Go to the home assistant integration mqtt page and check the entities there. Is there a duplicate integration? Are the readings showing up there? What are the entity id’s (click on the entity then the cog wheel in the pop-up)?
Hi, I have the same issue but using API.
here is my YALM file
esphome:
name: cuisine1
platform: ESP32
board: esp-wrover-kit
wifi:
ssid: ""
password: ""
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Cuisine1 Fallback Hotspot"
password: "L1sP9Nm9UGl6"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
esp32_ble_tracker:
sensor:
- platform: xiaomi_lywsdcgq
mac_address: 58:2D:34:2A:60:02
temperature:
name: "Xiaomi LYWSDCGQ Temperature"
humidity:
name: "Xiaomi LYWSDCGQ Humidity"
battery_level:
name: "Xiaomi LYWSDCGQ Battery Level"
the log shows that it reads the data all right
[23:14:31][C][api:095]: API Server:
[23:14:31][C][api:096]: Address: cuisine1.local:6053
[23:14:38][D][xiaomi_ble:161]: Got Xiaomi LYWSDCGQ (58:2D:34:3A:60:02):
[23:14:38][D][xiaomi_ble:164]: Temperature: 25.8°C
[23:14:38][D][xiaomi_ble:167]: Humidity: 46.6%
but the data remains ‘unknown’ in lovelace
[sensor.xiaomi_lywsdcgq_humidity](http://192.168.43.64:8123/developer-tools/state#) unknown unit_of_measurement: % friendly_name: Xiaomi LYWSDCGQ Humidity icon: mdi:water-percent
THanks in advance for help!
Hi, sorry… it works.
Actually had made a typo of 1 character in the mac adsress of the device.
See you,
najot