Does HA ignore repeat sensor values?



  • I'm trying to diagnose some repeater issues. I have a temperature sensor sending data every 10 seconds. Home Assistant will go several minutes before it will show a last updated timestamp for my temperature sensor. I can verify in Netcat that the gateway is getting the values every 10 seconds. By chance, I noticed in the debug output, Home Assistant only fires the Event state_changed when the value actually changes. I guess this makes sense.
    Is this normal behavior for HA? Can this be disabled so every sensor message is logged?


  • Plugin Developer

    Yes this is normal behavior in HA. But it can be turned off, on a platform basis in HA. I have a PR incoming that will force state updates for mysensors sensors.

    https://github.com/home-assistant/home-assistant/pull/3648



  • It would be very nice to be able to choose between HA interface update/don't update for the same value. For me, I am looking for last time value change/receive also as a confirmation of node running in good shape. Thank you.



  • @martinhjelmare I see you PR was merged a while ago. It looks like the force_update property defaults to TRUE. Is this now the default behavior for all MySensors sensors?

    Sorry if this seems obvious, I just want to double check.
    Thanks for your work and time!


  • Plugin Developer

    @Cravecode

    Hi! Yes, pure sensors will default to force updates.



  • @martinhjelmare, sorry to bring up an old topic. I'm on a version of HA that includes your PR (v.: 0.54.0), however, my motion sensors only update their last_updated property when the motion sensor's state changes. I can see in HA'a log that it is receiving the expected repeated state (1;1;1;0;16;0) every X minutes, but the entity doesn't update the last_updated timestamp unless the motion sensor's state changes. Is there a way I can force the last_updated timestamp for each msg?

    Some context: I'm attempting to write automation rules to create alerts for sensors that have not checked-in within X minutes.


  • Plugin Developer

    @Cravecode

    I think you can set force_update to true under customize for the entity in question.

    It seems it's not possible to customize that property.


 

399
Online

7.9k
Users

8.8k
Topics

93.8k
Posts