Closed goldtnt closed 4 years ago
In which logs do you see this? HA or Add-On? Can you share your sensor config? Sounds like there may be an extra space here or data is missing
In which logs do you see this? HA or Add-On? Can you share your sensor config? Sounds like there may be an extra space here or data is missing
HA I think the problem is the platform: mqtt
type: sensor
platform: mqtt name: "Paulo Weight" state_topic: "miScale/Paulo/weight" value_template: "{{ value_json['Weight'] }}" unit_of_measurement: "kg" json_attributes_topic: "miScale/Paulo/weight" icon: mdi:scale-bathroom
platform: mqtt name: "Example Name BMI" state_topic: "miScale/Paulo/weight" value_template: "{{ value_json['BMI'] }}" icon: mdi:human-pregnant
The erros is: end of the stream or a document separator is expected at line 2, column 1: - platform: mqtt ^
the above looks fine. Can you also share your add-on config? Are you sure you've set up your MQTT broker correctly? Have you tried a 3rd party tool like MQTT Explorer to make sure all the data shows up under the right topics (they're case sensitive)
the above looks fine. Can you also share your add-on config? Are you sure you've set up your MQTT broker correctly? Have you tried a 3rd party tool like MQTT Explorer to make sure all the data shows up under the right topics (they're case sensitive)
Here's my config.
HCI_DEV: hci0 MISCALE_MAC: '0C:95:41:89:B9:29' MQTT_PREFIX: miscale MQTT_HOST: 192.168.1.143 MQTT_USERNAME: homeassistant MQTT_PASSWORD: maek4eevosie3oJa6shioc2e MQTT_PORT: 1883 TIME_INTERVAL: 30 MQTT_DISCOVERY: true MQTT_DISCOVERY_PREFIX: homeassistant USER1_GT: 70 USER1_SEX: male USER1_NAME: Paulo USER1_HEIGHT: 180 USER1_DOB: '1977-12-24' USER2_LT: 50 USER2_SEX: female USER2_NAME: Teresa USER2_HEIGHT: 176 USER2_DOB: '1978-07-27' USER3_SEX: female USER3_NAME: None USER3_HEIGHT: 160 USER3_DOB: '1950-01-01'
The MQTT broker is working with ESPHome. I have tested too, with MQTT.fx I have ESPs working with MQTT.
Your issue is you have the topic "miscale" set in your add-on config but the topic "mi-scale" in your HA config
Select Add-On (place a lowercase
x
for the relevant add-on)Describe the bug When I'm trying to add a sensor an error is displayed
To Reproduce end of the stream or a document separator is expected at line 2, column 1: - platform: mqtt ^ Cannot read property 'setConfig' of undefined
Scale (please complete the following information):
Device running Home Assistant (please complete the following information):