Consider a sensor:
template:
- binary_sensor:
- name: testing_logbook_sensor_with_image
state: >-
{{ states('input_boolean.test_boolean') }}
picture: >-
{% if is_state('input_boolean.test_boolean','on') -%}
/local/images/test/orange.jpg
{%- else -%}
/local/images/test/blue.jpg
{%- endif %}
A logic is simple:
ON, orange image
OFF, blue image
What is stored in DB - 2 types of records inside “state_attributes”:
And here is a logbook:
type: logbook
entities:
- binary_sensor.testing_logbook_sensor_with_image
hours_to_show: 1
Seems that Logbook ignores “entity_picture” data from DB and uses the last value.
I recall a related discussion on Github after ~2022.6.
I wonder why Logbook cannot at least attempt to show an image based on a corresponding URL.
No feedback. registered in issue:
opened 04:22PM - 25 Jul 24 UTC
### Checklist
- [X] I have updated to the latest available Home Assistant ver… sion.
- [X] I have cleared the cache of my browser.
- [X] I have tried a different browser to see if it is related to my browser.
- [ ] I have tried reproducing the issue in [safe mode](https://www.home-assistant.io/blog/2023/11/01/release-202311/#restarting-into-safe-mode) to rule out problems with unsupported custom resources.
### Describe the issue you are experiencing
Consider a template sensor:
```
template:
- binary_sensor:
- name: testing_logbook_sensor_with_image
state: >-
{{ states('input_boolean.test_boolean') }}
picture: >-
{% if is_state('input_boolean.test_boolean','on') -%}
/local/images/test/orange.jpg
{%- else -%}
/local/images/test/blue.jpg
{%- endif %}
```
A logic is simple:
- ON, orange image
- OFF, blue image
What is stored in DB - 2 types of records inside “state_attributes”:
![74578fd86af340ae5c818664345fa13bb427a23d](https://github.com/user-attachments/assets/49ef5d16-fa35-471d-b7f1-864071b2379b)
![aaaac56796f758f0531610f610b88e80c91433a0](https://github.com/user-attachments/assets/2ff25905-0bcd-4a77-8ad0-c794906acb6d)
And here is a logbook:
```
type: logbook
entities:
- binary_sensor.testing_logbook_sensor_with_image
hours_to_show: 1
```
![Untitled Project](https://github.com/user-attachments/assets/9291a563-a30b-41e6-8d69-c812e9cd50db)
Seems that Logbook ignores “entity_picture” data from DB and always uses the last value.
I recall a related discussion on Github after ~2022.6 - https://github.com/home-assistant/frontend/issues/12851#issuecomment-1146715643.
I wonder why Logbook cannot at least attempt to show an image based on a corresponding URL.
### Describe the behavior you expected
Logbook shows a valid `entity_picture` - not the latest one.
If the the image is not available - it shows some stub image.
### Steps to reproduce the issue
as above
### What version of Home Assistant Core has the issue?
2024.7.1
### What was the last working version of Home Assistant Core?
_No response_
### In which browser are you experiencing the issue with?
Chrome 126.0.6478.127
### Which operating system are you using to run this browser?
Win10x64
### State of relevant entities
_No response_
### Problem-relevant frontend configuration
_No response_
### Javascript errors shown in your browser console/inspector
_No response_
### Additional information
_No response_
Compare with a custom:logbook-card: