homeassistant-elasticsearch
homeassistant-elasticsearch copied to clipboard
Support for "always changed"
I am using only_publish_changed, and it is great, but I have problems with binary sensors where publishing at regular time intervals makes it easier to analyse (and graph).
I imagine that adding a config structure, similar to "exclude" (domain and entities lists) would be the way to go (if this is a feature that is wanted). If i were to choose a name, maybe "always_changed".
In my 5 minutes of looking at the code I would imagine adding a section to
do_publish(self):
Right below
if not self._only_publish_changed
With something like:
elif <always_changed has anything in it>:
However, I am not confident enough about the code yet to assume.
Thanks for the issue @CVi.
I'm in favor of this -- I think a name like always_publish might make sense, and it would only have an impact when only_publish_changed is set to true (when false, it's the equivalent of specifying all domains/entities under always_publish)
In an effort to reduce configuration bloat, I am going to close this as "not planned". We can re-evaluate this decision in the future if there is sufficient demand.