Thanks. Missed that option. Cheers.
Is it possible to change the name of an entity with auto-entities?
Like in type: entities
entity: sensor.rain
name: Rainsensor
This doesnāt work:
- type: custom:auto-entities
show_empty: false
card:
type: entities
show_header_toggle: false
filter:
include:
- entity_id: sensor.rain
name: Rainsensor
options:
Great, thanks.
Just one more question. One of my sensors reports seconds and it would be better to see the information in minutes. Is there a way to do that calculation directly in lovelace without adding a template sensor for each sensor that should transformed?
HI Thomas,
using this auto-entities card:
- type: custom:auto-entities
card:
type: entities
title: Github repos
show_header_toggle: false
entities:
- entity: automation.github_repo_update
secondary_info: last-triggered
filter:
include:
- entity_id: sensor.github*
options:
type: custom:dummy-entity-row
# state: >
# {% if state_attr(config.entity,'latest_release_url') %}
# {{ state_attr(config.entity,'latest_release_url').split('tag/')[1]}}
# {% else %} Not set
# {% endif %}
# secondary: >
# {{ state_attr(config.entity,'latest_commit_message')}}
# secondary: "{{ as_timestamp(states[config.entity].last_changed)| timestamp_custom('%X - %D') }}"
sort:
method: name
stopped working altogether now, because of this error, which is logged
2020-02-12 09:56:10 ERROR (SyncWorker_7) [homeassistant.components.github.sensor] GitHub error for custom-cards/vertical-stack-in-card: 401 {'message': 'Bad credentials', 'documentation_url': 'https://developer.github.com/v3'}
2020-02-12 09:56:10 ERROR (SyncWorker_7) [homeassistant.components.github.sensor] Error setting up GitHub platform. Check previous errors for details
How could HA think this is a vertical-stack-in-cardā¦?
Donāt understand the Github credentials error either, and I have even refreshed the token. But thatās maybe another matter. Turning to you here for the ācardā issue reported.
Iām sorry for taking my time with this one. I had to sleep on it because itās so utterly confusing.
I mean, assuming - of course - that you have determined that this error is caused by auto-entities, and are not just pasting random error messages here without even reading them - itās weird how frontend errors suddenly show up in the backend log, isnāt it?
To make it even weirder, the errors show an integration name which just happens to be the very same that the sensor you include in a dummy-entity-row belongs to. Crazy coincidence, right?
Wouldnāt it be an even more amazing coincidence if the repository address in the first error message happened to match one that you are monitoring with a github sensor? The mere idea boggles the mind!
Alas, as it stands now Iām absolutely baffled. Iāve never before seen a lovelace card turn into a teapot (lacking any description at all on how āstopped working altogetherā manifests, Iāll assume it throws a HTTP 418 error). And ābecause of [an] errorā none the lessā¦
Fascinating
well, now this is a very special reply of yours. Iāll swallow the sarcasmā¦
I was just as baffled as you are. Really sorry for being such an idiot, truly am.
Still, your response made me see what is wrong, so thank you very much indeed. The sensor config for the vertical-stack-in-card GitHub repo is erroring out, rather than it being an error for a vertical-stack-in-card Lovelace config. Which I have not, hence me being baffled. Again: I beg your pardon.
Because of that, the full set of GitHub sensors isnāt created. (āstopped working all togetherā) I see that now.
Because this is my sensor setup (If one of these returns an error, the full sensor config is being blocked)
sensor:
- platform: github
access_token: !secret github_token
entity_namespace: Github
scan_interval: 3600
repositories:
- path: home-assistant/home-assistant
name: Home-assistant
- path: thomasloven/hass-browser_mod
name: Browser mod
- path: dnguyen800/air-visual-card
name: Air visual
- path: thomasloven/lovelace-auto-entities
name: Auto entities
- path: custom-cards/bar-card
name: Bar
- path: custom-cards/bignumber-card
name: Big number
- path: custom-cards/button-card
name: Button
- path: thomasloven/lovelace-card-mod
name: Card mod
- path: thomasloven/lovelace-card-tools
name: Card tools
# - path: custom-cards/config-template-card
- path: maykar/custom-header
name: Custom header
# - path: iammexx/home-assistant-config/tree/master/ui/darksky
# name: Darksky weather card
- path: custom-cards/decluttering-card
name: Decluttering
- path: custom-cards/entity-attributes-card
name: Entity attributes
- path: thomasloven/lovelace-fold-entity-row
name: Fold entity row
- path: custom-cards/gauge-card
name: Gauge
- path: custom-cards/group-card
name: Group
- path: thomasloven/lovelace-layout-card
name: Layout card
- path: DBuit/light-popup-card
name: Light popup
- path: iantrich/list-card
name: List
- path: gadgetchnnel/lovelace-card-templater
name: Card templater
- path: kalkih/mini-graph-card
name: Mini graph
- path: kalkih/mini-media-player
name: Mini media player
- path: benct/lovelace-multiple-entity-row
name: Multiple entity row
- path: gurbyz/power-wheel-card
name: Power wheel
- path: iantrich/restriction-card
name: Restriction
- path: custom-cards/secondaryinfo-entity-row
name: Secondary info row
- path: kalkih/simple-weather-card
name: Simple weather
- path: thomasloven/lovelace-slider-entity-row
name: Slider entity row
- path: thomasloven/lovelace-state-switch
name: State switch
# - path: bramkragten/custom-ui/tree/master/swipe-card
- path: thomasloven/lovelace-template-entity-row
name: Template entity row
# - path: rodrigofragadf/lovelace-cards/tree/master/tiles-card
- path: thomasloven/lovelace-toggle-lock-entity-row
name: Toggle lock entity row
- path: ofekashery/vertical-stack-in-card
name: Vertical stack in card
- path: royto/waze-card
name: Waze
- path: sgttrs/lovelace-weather-card-chart
name: Weather card chart
Hope I will get a chance to ask you about the issue I have with the (now commented) templates I use when the card type is template-entity-row. Ive posted it on the correct thread. They keep switching between showing the template, and the template output.
Iām sorry for the hard words.
Itās justā¦ as Iām seeing parts of your configuration evolve, and seeing what you are making from my plugins, I believe Iām starting to understand your capabilities and how you think about this kind of things.
ā¦and you could have cracked that one yourself - absolutely no doubt! - if youād just looked it all over once more before posting.
I also believe people in general learn more by solving problems themselves. Iām not trying to discourage anyone from asking for help, justā¦ give it some rest and then try once more before asking. Perhaps just stepping back a minute will help seeing things differently.
Iām glad you solved it. I tried to be a bit helpful behind all that stupid sarcasm, and Iām happy you saw that - I was almost certain you would.
As for your other problem, I think Iām starting to understand whatās happening, and itās possible that the new version released yesterday might actually fix it.
Sorry.
Thx mate. Really. Much appreciated!
Will check the update soon and report back
update
indeed seems to have fixed it:
only left (for me in this card) is the need for a more-info on tap.
- type: custom:auto-entities
card:
type: entities
# title: Github repos
show_header_toggle: false
header:
type: picture
image: /local/images/github_owler.png
entities:
- entity: automation.github_repo_update
secondary_info: last-triggered
filter:
include:
- entity_id: sensor.github*
options:
type: custom:template-entity-row
state: >
{% if state_attr(config.entity,'latest_release_url') %}
{{ state_attr(config.entity,'latest_release_url').split('tag/')[1]}}
{% else %} Not set
{% endif %}
secondary: >
{{ state_attr(config.entity,'latest_commit_message')}}
# # secondary: "{{ as_timestamp(states[config.entity].last_changed)| timestamp_custom('%X - %D') }}"
sort:
method: name}
when clicking a row, nothing happens. Would be really nice if you could explain to me how I can enable that. If needed, Iāll hop over to the template-entity-row thread.
aamof, it would be great if we could use both tap and hold action. tap for more-info, hold for url navigation to the repoā¦
filter:
include:
- entity_id: sensor.github*
options:
type: custom:template-entity-row
state: >
{% if state_attr(config.entity,'latest_release_url') %}
{{ state_attr(config.entity,'latest_release_url').split('tag/')[1]}}
{% else %} Not set
{% endif %}
secondary: >
{{ state_attr(config.entity,'latest_commit_message')}}
sort:
method: name
tap_action:
action: more-info
hold_action:
url_path: >
{{ state_attr(config.entity,'latest_release_url')}}
hope you will consider.
HI Thomas,
please let me bother you once again, really sorry, and yes, Ive been trying to look at this from all angles (known to meā¦)
Iāve been checking this for the last few hours, but canāt find the answer, other than the combination of glance core card and auto-entities (and/or template-entity-row) has some incompatibilities.
Ive even made various forms of template sensors, which use custom_timestamp or not for state, and now finally wound up using a template sensor that has the timestamp for state, and an attribute_template ādateā, using the custom_timestamp.
posted here Iāll summarize:
using the entities card this works perfectly
- type: 'custom:auto-entities'
card:
type: entities
filter:
include:
- entity_id: sensor.*_trash_timestamp
options:
type: custom:template-entity-row
state: >
{{state_attr(config.entity,'date')}}
sort:
method: state
but using the exact same setup with glance card (also tried custom:hui-glance-card), the sensors are displayed with their state, and not the template-entity-row templates for state.
- type: 'custom:auto-entities'
card:
type: glance
filter:
include:
- entity_id: sensor.*_trash_timestamp
options:
type: custom:template-entity-row
state: >
{{state_attr(config.entity,'date')}}
sort:
method: state
Am I missing the obvious here, because of tunnel vision, or is this an incompatibilityā¦
once again: sorry if this sounds really noobish, I am simply out of ideas.
What happens when you manually place them into a glance card without the custom card? As a test.
As a matter of fact, I think that is what is happening just nowā¦
the states of these sensors are the timestamps, so that would be the same output?
btw, I created these timestamp sensors for the reliability of the sort order, based on state. (just like the alarm sensors you and I worked on so intenselyā¦)
- type: glance
title: Timestamp
entities:
- sensor.gft_trash_timestamp
- sensor.papier_trash_timestamp
- sensor.plastic_verpakkingsafval_trash_timestamp
- sensor.restafval_trash_timestamp
Well, I think this requires an Issue: FeatureRequest on the front end. Looks like the issue is with glance not accepting timestamp device_class.
yeah, something is not right, timestamps are not compatible with glance
but thereās more, I tried this next:
- type: glance
title: Timestamp
columns: 4
entities:
- sensor.gft_trash_timestamp
- type: custom:template-entity-row
state: >
{{state_attr('sensor.gft_trash_timestamp','date')}}
- sensor.papier_trash_timestamp
- type: custom:template-entity-row
state: >
{{state_attr('sensor.papier_trash_timestamp','date')}}
- sensor.plastic_verpakkingsafval_trash_timestamp
- type: custom:template-entity-row
state: >
{{state_attr('sensor.plastic_verpakkingsafval_trash_timestamp','date')}}
- sensor.restafval_trash_timestamp
- type: custom:template-entity-row
state: >
{{state_attr('sensor.restafval_trash_timestamp','date')}}
but that wont work either, glance doesnāt accept a card for an entity, like entities card does. it even stumbles on the columns in this case:
Well the timestamp device_class is only āmeantā for timestamps in the past. Iāve always thought that was stupid, but thatās the case. So, to me, itās no surprise that they donāt work in the future on glances, etc.
Glance cards canāt take custom stuff (yet?). So for a glance card youāre stuck with glance buttons.
probably need to create some custom card buttons thenā¦ thing is I need to order then based on the timestamp, which poses a new challenge altogetherā¦ no sure if the auto-entities card does that, but will try before I ask
somehow I feel a tweak coming up nextā¦ #fingerscrossed
Hello,
Is it possible to make this card work with cards that only take one entity? Such as media-control card? The idea would be that it then expanded out to show multiple copies of the card if the filter returned more than one entity.
Hi Thomas,
to have auto-entities select the only 4 sensors in my setup with an attribute next_pickup_in_days
I think I need to do this:
- type: 'custom:auto-entities'
card:
type: glance
filter:
include:
- domain: sensor
attributes:
next_pickup_in_days: '! none'
wouldnāt it be a future possibility to change the config into:
- type: 'custom:auto-entities'
card:
type: glance
filter:
include:
- attributes: next_pickup_in_days
meaning, filter all entities that have an attribute next_pickup_in_days
?
would you accept a feature request for this? I feel it would make the auto-entities even more powerful.
thanks for considering.