Support templated custom attributes for all template entities #2782
Describe the enhancementSummary Current behavior Example (works today) However, the same attributes: key is ignored or unsupported when used with: This forces users to create companion template sensors purely to hold metadata or derived attributes. Example usageRequested enhancement
Allow templated custom attributes to be defined directly on all template entity types, for example:
template:
- fan:
- name: Bathroom Fan
state: "{{ is_state('switch.fan_relay', 'on') }}"
attributes:
room: "Master Bathroom"
purpose: "Shower extraction"
controlled_entity: "switch.fan_relay" |
Answered by
Petro31
Aug 11, 2026
Replies: 3 comments 4 replies
|
@Petro31 could you maybe have a look at this please, seeing that you worked on binary_sensor before? |
0 replies
|
This would be a very valuable addition, instead on relying on yaml. |
4 replies
|
PR here |
0 replies
Answer selected by
Petro31
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PR here
home-assistant/core#178762