Closed bcameron21 closed 1 year ago
hi @bcameron21, did you enabled the HA integration?
https://github.com/sblantipodi/firefly_luciferin/wiki/Home-Automation-configs
Good point. Rereading that link, as well as a conversation on Discord I realised that I was using the package version of the integration. Removed that from HA, and let Luciferin set itself up with MQTT autodiscovery.
After this I was still getting the error in the logs.
Using MQTT Explorer I deleted the retained config message mentioned above, and that stops the error message.
However if I reset the config by clicking on the tick next to the MQTT discovery topic in the Luciferin settings, then that adds it back to MQTT. This also recreates the entity in HA (i.e. sensor.luciferin_ldr). And the errors start again!
The workaround I'm going with for now is to delete the MQTT retained message.
Not sure how else to investigate this further.
Hi @bcameron21, ok I identified the problem and fixed it.
You have found a workaround already, next release is going to fix the problem once and for all :)
Thank you for reporting it, this is much appreciated!!!
Firefly Luciferin version
2.10.10
Glow Worm Luciferin version
5.9.7
Firmware type
FULL
What is the stream method?
MQTT Stream
Fiefly Luciferin config file
No response
Relevant log output
No response
How to reproduce
My error logs are filled with warnings:
Template variable warning: 'dict object' has no attribute 'ldr' when rendering '{{ value_json.ldr }}'
I don't have a light density resistor installed or active. It seems that the Esp devices is passing a setting, but Home Assistant doesn't know what to do with it.
In Home Assistant it is picking up a Luciferin LDR entity from MQTT, with a value "Unknown".
Using MQTTExplorer I can see a config paramter being passed in the topic luciferin/ldr/config with the follwing value template:
{ "name": "Luciferin LDR", "icon": "mdi:theme-light-dark", "unique_id": "Luciferin_LDR", "state_topic": "lights/glowwormluciferin", "value_template": "{{ value_json.ldr }}", "unit_of_measurement": "%" }