Text sensors showing as bar graphs without a listed history is extremely counter intuitive.
Ok
I have reached out to the developer of the lock integration that is giving me this issue. I asked him to not assign a unit of measure to the sensors as it seems that is what stops the logbook style history from appearing in the more info.
Thatās not what stops it. If itās a set of known words, it should be an enum sensor.
Itās just a text sensor with last user name. Is there no way at all to manually override and get a listed history showing in more info?
I understand your point generally. If I may throw in an altenative/workaround? This card might offer what youare looking for: GitHub - royto/logbook-card: Logbook card for Home Assistant UI Lovelace
I do use that and itās very helpful.
I have an automation to publish the useless bar graph no history sensor into an input text sensor. This way the new sensor shows the current and history just like I need.
However if this this type of work around is required to return this function than maybe someone should address the introduced bug and return the functionality.
There is no introduced bug. This is a feature request.
In my searches I found it mentioned this came with a previous update.
I didnāt see a reply to this but, is there a way to manaully override an individual sensor so itās recorded?
Iāve got something like the plex āwatchingā count sensor, it has the unit of measurement āWatchingā on it, and it has no logbook entries. This sensor has a very low cardinality, as it only uses whole numbers, and in my case typically from 0-5 range, but I canāt figure out if thereās a way to manaully allow this for logbook tracking.
make an automation to log that.
- alias: Log Plex Watching
trigger:
- platform: state
entity_id: sensor.plex_watching
action:
- service: logbook.log
data:
name: Plex
message: {{ trigger.to_state.state }} are watching plex
# Optional
entity_id: sensor.plex_watching
domain: sensor
Thanks, this gets me started in the right direction.
One problem I have is that I see the entry in the general logbook page - but I cannot filter on the entity_id. Itās just not in the filter pulldown. Since I canāt filter on it, adding it to my dashboard also comes up with nothing still. Iām not sure why i can see it in the general logbook list but canāt filter on it.
Iām assuming here that the entity_id (sensor.plex_watching) needs to be an existing sensor or does it need to be something new that gets created?
Edit: Figured it out. Canāt be done. Even writing it to the log with the above code it still gets excluded from the DB because itās a sensor that has a āunit of measurementā and those are auto purged. Kind of crappy there is no work around there. The solution was to make a new sensor that just took the state of the plex sensor, excluding all the other attributes.
plex_watch_count:
friendly_name: "Plex Watch Count"
value_template: '{{ states("sensor.plex_my_nas") }}'