-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discrete / Unavailable sensor values in HA with deep sleep mode #352
Comments
Yeah, probably #320 Could you do two things:
|
Thanks again Otto for the great help. Yep indeed I see a similar thing happening. Add the following entry and recompiled my yaml See these logs in HA
I will try installing the patch now. Where is located esphome/components/mqtt/mqtt_component.cpp in hassio ? Can't find it inside my docker instance. Is it inside the underlying OS ? I will install the whole Beta release for the moment. |
Ok I have installed the beta. 1/ For some strange reasons I have this weird regression
gets the validation error :
The actual entry in yaml file is
2/ The two template sensors don't get reported in HA anymore as sensors as before
Should I declare a "sensors:" entry for these two now ? 3/ Apart from these two regressions, I can confirm that now I have a proper continuous reporting of values, once I add the birth and will empty entries in my mqtt tag in the yaml file, and no error logs in HA about it anymore. |
Thanks for testing! And for reporting issues in the beta!
|
Yeah Ok I made myself a fool again... I deployed the Beta as I thought it was the version carrying the patch... I realized afterwards that the Dev branch did carry the patch as well. Once I woke up my brain and deployed the Dev Branch the second issue disappeared so do not worry about it... Only still have the point 1 with the TSL sensor being shout at... |
Well this one was an easy one. I've just checked the content of the patch. I just forced the integration_time tag and "Voila" ! I will update my install as I've seen that you have already commited the change for the default value to 402ms. Everything is running smootly now. This is so great ! Thanks ! |
Operating environment/Installation (Hass.io/Docker/pip/etc.):
Hassio on Docker
ESP (ESP32/ESP8266, Board/Sonoff):
ESP8266
Affected component:
https://esphome.io/components/mqtt.html#mqtt-last-will-birth
Description of problem:
Hi there. This may not be an issue apart from me being stupid...
I have been struggling to understand the bahaviour I have since switching from api mode to MQTT mode in order to accomodate for deep sleep mode.
I have this wireless weather station which has 10s uptime every 10min. It sends out various values for a bunch of sensors. While in api mode everything worked fine except that it would stop updating values after a while. The solution recommended by Otto was to switch to MQTT mode and indeed updates are much more reliable now.
The only remaining issue I have is that, whereas while in api mode I had my sensor values being displayed in HA lovelace as continuous values (in graphs) and last value received in entity cards, in MQTT mode, while everything updates fine every 10 min, I have discrete values in graphs (points displayed) and in entity cards, I have an "Unavailable" while in deep sleep (last value received is not displayed when in deep sleep).
This seems to be the purpose of the described procedure here as it is indeed the behaviour I am witnessing (ESPHome uses the last will testament and birth message feature of MQTT to achieve availability reporting for Home Assistant. If the node is not connected to MQTT, Home Assistant will show all its entities as unavailable (a feature 😉).) :
https://esphome.io/components/mqtt.html#mqtt-last-will-birth
I have spent several hours trying to understand how to get a continuous/last received value in HA lovelace, but have not suceeded to do so.
It seems to be the same issue as described here if I am not mistaking, but I am not sure.
#320
Sorry if this is a very obvious thing I am missing...
Problem-relevant YAML-configuration entries:
Traceback (if applicable):
Additional information and things you've tried:
The text was updated successfully, but these errors were encountered: