I have an (iOS) device integrated by the official HA Companion app. It provides a battery state sensor storing the Low Power Mode in an attribute.
I want auto-entities to show all entities with state Low Power Mode: true. Unfortunately, auto-entities seems to not being able to handle the ānot so preciseā naming of this attribute.
E. g. this is working for the default attribute within a normal entities card:
- type: attribute
entity: sensor.phone_battery_state
attribute: 'Low Power Mode'
But with auto-entities nothing is displayed. Doesnāt matter how I write the Low Power Mode. Bug or am I using it wrong?
As for āLow Power Modeā attribute.
In my experience, if some attribute is displayed as āXxx Yyy Zzzā, that means that itās actual name is āxxx_yyy_zzzā.
But this particular āMobile Appā integration is smth strangeā¦
Check these templates:
That means that you may address this attribute only by using the "Xxx Yyy Zzz" name.
Try using this template (just replace āfalseā with ātrueā):
filter:
template: >-
{% for sensor in integration_entities("mobile_app") -%}
{%- if is_state_attr(sensor,"Low Power Mode",false) -%}
{{sensor}},
{%- endif -%}
{%- endfor %}
I tried using āselectattrā filter - does not work:
{{states | selectattr('attributes["Low Power Mode"]', 'eq', false) |
map(attribute='entity_id') | list }}
{{states | selectattr('attributes.low_power_mode', 'eq', false) |
map(attribute='entity_id') | list }}
We use templates in Configuration to create template sensors, why not using templates in Frontend?)))
I do not think this is supportedā¦
Every attribute which I have seen is a kind of āxxx_yyy_zzzā - and is presented in UI as āXxx Yyy Zzzā - letās call these attributes NORMAL. These attributes from Mobile App are STRANGE (I would call them in Russian by another word - and the whole Mobile App integration is unstable and unreliable, IMHO).
Thank you VERY MUCH! The output is pretty much exactly what I was looking for. Think I need to start using templates in the UI to get even more out of whole HA.
Iām not brave enough to raise an issue for the mobile_app integration but I double what you said - thatās not a ānormalā naming convention and itās from the official appā¦ anyway, auto-entities is working for now
got to love the new integration_entities template options, and a very nice template for auto-entities indeed!
whatās your issue with it? I must confess after having switched over to the mobile app completely, and drop all other trackers, I havent seen an issue in location anymore.
Login is smooth as can be, local and external, and now we even have local notifications
Do you mean āWhy do you dislike Mobile App integrationā?
It is an off-topic here )))
Because sensors like ābattery levelā are updating ONLY when I open the Companion App. I got iPad Air 2, iPhone 5S, iPhone 6S+ - all of them have āBackground app refresh = ONā option in iOS settings but this does not help. And another issue is that Companion App is too buggy to be used. And one more issue is that iPhone 5S, 6S+ sometimes even cannot open a dashboard, just displaying a white screen. May be the latest iPad & iPhone work smooth.
ok, I see, and yes, its needs some more modern devices than my older iPad Air, on 12.5.5ā¦ other than that, I think its really nice, and not buggy at all. but yep off-topicā¦ sorry.
I might be running into an issue while using this auto-entities thingie. Iām using it happily to display all my Shellyās with an indicator whether or not a software upgrade is available. That works just fine. Since Shelly supports a button-type to OTA update the unit, I thought I might factor that in as a tap-action to these buttons.
The buttons look like this:
The code Iām using for the button is as follows:
Tapping to button to invoke the action displays the confirmation window just nicely with the entity_id of the shelly to be updated. However, it fails with:
Failed to call service button/press. must contain at least one of entity_id, device_id, area_id
If I separate the button from the auto-entities code, it works fine.
Iām using the exact config to only show the mediaplayers (different sonos devices) currently playing. BUT, and here comes the question, how do you give the options used by the entities in this type of card (auto-entities)
Question to be clear : How can I show the media_player AND the artwork in full-cover modus in above script ? artwork: full-cover ā where to put it in the above script ?
But if you are using the default media_player card, there are no additional attributes? If you are using the media player entity, there are no additional attributes here either.
hey all, im still dont understand how to code, but i do learn from examples
Id like to make the lights On into a Folder Entity??
where do i add this code
type: custom:fold-entity-row
head:
type: section
label: Lights On
HOWEVER, when I use Template in the Developer Tools, the result shows the list of all batteries (with %) along with all the sensors that have a battery.
The intention would be to only have to specify the card type once - instead for each entity that is included. I guess I could contruct a regex for entity_id but that would probably not look very nice either.