WTH: Why don't sensors show logbook in dialog?

Text sensors showing as bar graphs without a listed history is extremely counter intuitive.

Ok :+1:

1 Like

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.

2 Likes

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") }}'

Itā€™s definitely a bug

Sorry, itā€™s not. Whether you agree with it or not, this was done on purpose. Adding logbook entries for these values has been denied in the past as well. Its something that simply will not change.

The entityā€™s values already show up in the global logbook. They just donā€™t show up in the entityā€™s own More Info dialogā€™s logbook. Thatā€™s the bug. Not everything the HA developers do is the word of God until they fix the mistake later

That is also by design because sensors have the history graph.

This has been brought up many times. Sorry, this is not a bug.

Every domain in home assistant has a different more-info page. Some show attributes, some show logbook, some just show history. Itā€™s all by design.

It is a bug. Hereā€™s the corresponding frontend issue on GitHub.

My man, just because another user creates an issue, does not mean itā€™s an actual issue.

But how do you know itā€™s by design? The global logbook shows the changes for the entity, so why would it be missing from its More Info page? Thatā€™s an obvious oversight, if not a bug.

Because Iā€™ve been in conversations about this with the core team.