Add dashboard read only option to the graphical UI

In my dashboards I often have the need to show a value of an entity without allowing it to be changed on the dashboard. As far as I know, the only work-around / solution is to use a template to create a read-only version of the same entity.

It would be great if there were an option to make the entity read only on the dashboard which would eliminate the need to create a template.

In the example below, the due dates are calculated automatically therefore I used templates to make them display only. It would also be important for the read only / display only option to display the status without, in the case of the date, the huge gray box around it. In other words, it should just render the state of the entity.

EDIT: @tom_l describes a YAML based solution in a post below that appears to do what I was requesting, however as @reef-actor suggested, it would be awesome for this feature to be exposed as a simple checkbox in the UI, and made available on all entities where it makes sense (probably anything that has a state.)

I say give people the option to have any of them read-only or not - this is the way.

@KruseLuds - I just realized the title was way off after posting, so I adjusted it. I think what you are saying is what I was suggesting. Add toggle to make the entity R/W or just R. If R then display as text without all the controls, box, etc.

There is already an option for this (simple-entity).

https://www.home-assistant.io/dashboards/entities/#options-for-entities


.

Combine this with disabling the more-info pop-up (where it could be edited) and you have a read only entity:

type: entities
entities:
  - entity: input_number.rain_limit
  - entity: input_datetime.mstr_bed_blanket_on_time
  - type: divider
  - entity: input_number.rain_limit
    type: simple-entity
    tap_action: none
    hold_action: none
  - entity: input_datetime.mstr_bed_blanket_on_time
    type: simple-entity
    tap_action: none
    hold_action: none

Top two entities are editable, bottom two same entities under the divider are not:

Screenshot 2024-04-20 at 08-58-52 Administration – Home Assistant

5 Likes

TIL

Perhaps this FR could be updated to a request that this is exposed in the visual editor as a checkbox?

@tom_l Thank you, I will test this asap but it looks like it will do what I want. Would be nice for it to be exposed as a checkbox as suggested by @reef-actor below so I updated the FR accordingly.

1 Like

I updated the FR title for you.

1 Like

Thanks for updating it. Only observation is that to know what it means, you need to know what simple-entity is.

Maybe something like “Add dashboard type option ‘simple-entity’ to UI to make entity read-only on dashboard” would make it easier for others to find this FR and vote for it.

Fixed.

1 Like