Iām trying to create a Delivery card based off the 17Track sensor and using auto-entities to populate it, and am having some difficulties with the way the sensor stores names (it prefixes each name with 'Seventeentrack Package: '). I was hoping I could get round this by using a name template, something like this (early days of home assistant coding, so apologies if Iāve made glaring mistakes):
Yey, I figured it out. The customize_glob problem was that I didnāt realise it needed to be member of homeassistant:, so a few indents later and that was sorted. It didnāt help with the templating through. What did was using another one of @thomasloven customisations, template-entity-row. Here what is working, with dynamic icons and nicer looking names, in case it helps someone else:
Things that still need looking into, so donāt copy them, although any help would be appreciated:
The animation bit doesnāt work
The tap_action canāt be templated
Iāve guessed the names of the āCollectionā, āExpiredā, āReturnedā and āNot Deliverableā states, for the moment
I was desperate to use anchors, until I used them and realised they didn;t work inside Template code
Iāve no idea what the difference between > and >- at the start of a multi-line template, Iāve used them interchangeably and not noticed any difference myself.
the entity is sensor.github_home_assistant. I want those to be colored based on the input_boolean with the same object_id, input_boolean.github_home_assistant
if config.entity is the entity_id, should I then use:
:host {
--paper-item-icon-color:
{% set id = config.entity.split('.')[1] %}
{% set repo = 'input_boolean.' + id %}
{% if states(repo) == 'on' %} gold
{% else %} green
{% endif %}
;
However, the reverse should be applicable, i.e. the current details should stay always and the top two entities should be allowed to roll-up. I do not seem to be able to get the ācustom: fold-entity-rowā visible this time. Any suggestions where Iām wrong in the revised code below?
Thanks for thinking along with me but unfortunately no luck. I started from scratch again and deleted the code associated with the custom: auto-entities.
entities:
- entity: sensor.gad_vandaag
- entity: sensor.gad_morgen
- entity: sensor.gad_restafval
- entity: sensor.gad_gft
- entity: sensor.gad_papier
- entities:
- entity: input_boolean.notify_utility
- entity: input_datetime.gad_notification_time
head:
label: Notification Settings
type: section
padding: 0
type: 'custom:fold-entity-row'
show_header_toggle: false
style: |
ha-card {
border: solid 2px var(--primary-color);
}
title: GAD
type: entities
Now i need to find out how to insert the necessary lines to apply the custom:auto-entities to the top five entities such that they will be sorted based on
Thomas, this is working fine now. only issue left might be that the template isnāt auto-updating, and needs a manual refresh. Can I set an entity for the template so it updates on that entity_id?
:host {
--paper-item-icon-color:
{% set id = config.entity.split('.')[1] %}
{% set repo = 'input_boolean.' + id %}
{% if states(repo) == 'on' %} gold
{% else %} green
{% endif %}
;
yea, I feared as muchā¦ I donāt want to list all that, there are way to many to listā¦ and, it takes away the beauty of the auto-entities card. It would have to be something like this:
{{trigger.event.data.entity_id in state_attr('group.github_repo_updates','entity_id')}}
if any of these entity_idās would change it would have to update the sensor listed in the card made by the auto-entities card.
If thatās not possible, now, or in the future, it might be best off with this automation I already have, and ad an extra service to that, updating the sensor with the object_id of the triggering entity_id:
? they both throw errors btw, but they do workā¦, no they dont, it was because I switched views, from the log back to the view again, and it rerendered the auto-entitiesā¦ canāt an automation trigger the re-rendering of that card? if must the view maybe?
I have my cameraās motion sensors displaying when thereās movement and I was wondering if there is a chance to set the tap-action for certain entities to, instead of showing the more info box of the motion sensor, show the actual camera.
since I am looking for a way to color the icons, based on a template in (card-mod) style, did you do so here? or are these colored by custom-ui in the backend.
My battery sensors will al be the default grey after updating to HA 110ā¦ since the way custom-ui uses icon_color is no longer working from hat HA version.
Thomas, is it possible to use a template in the auto-entities that works for all entities in that card? I ask because since the earlier success here doesnt seem to work in this auto-entities card using:
This plugin is awesome!
Is it also possible to filter for a specific length?
I have a some list of fuel prices from nearby recognize with ocr only sometimes it miss the last part. So is it possible only show entinties with 2 decimals.