Closed SeLLeRoNe closed 4 years ago
Ok, I found that there is a service call that can be performed directly inside the card but that doesn't work for the "whole card" (and even the tap_action is ignored for the "whole card")
Example:
type: custom:multiple-entity-row
name: '[[name]]'
entity: input_number.climate_[[area]]_[[day]]_[[timing]]
icon: mdi:timer
primary:
entity: input_boolean.climate_[[area]]_[[day]]_[[timing]]
service: browser_mod.popup
service_data:
title: Configuration
card:
type: entities
entities:
- input_boolean.climate_[[area]]_[[day]]_[[timing]]
- input_datetime.climate_[[area]]_[[day]]_[[timing]]_start
- input_datetime.climate_[[area]]_[[day]]_[[timing]]_end
- type: section
label: Temperature
- type: custom:slider-entity-row
entity: input_number.climate_[[area]]_[[day]]_[[timing]]
full_row: true
secondary:
entity: input_datetime.climate_[[area]]_[[day]]_[[timing]]_start
service: browser_mod.popup
service_data:
title: Configuration
card:
type: entities
entities:
- input_boolean.climate_[[area]]_[[day]]_[[timing]]
- input_datetime.climate_[[area]]_[[day]]_[[timing]]_start
- input_datetime.climate_[[area]]_[[day]]_[[timing]]_end
- type: section
label: Temperature
- type: custom:slider-entity-row
entity: input_number.climate_[[area]]_[[day]]_[[timing]]
full_row: true
tertiary:
entity: input_datetime.climate_[[area]]_[[day]]_[[timing]]_end
service: browser_mod.popup
service_data:
title: Configuration
card:
type: entities
entities:
- input_boolean.climate_[[area]]_[[day]]_[[timing]]
- input_datetime.climate_[[area]]_[[day]]_[[timing]]_start
- input_datetime.climate_[[area]]_[[day]]_[[timing]]_end
- type: section
label: Temperature
- type: custom:slider-entity-row
entity: input_number.climate_[[area]]_[[day]]_[[timing]]
full_row: true
service: browser_mod.popup
service_data:
title: Configuration
card:
type: entities
entities:
- input_boolean.climate_[[area]]_[[day]]_[[timing]]
- input_datetime.climate_[[area]]_[[day]]_[[timing]]_start
- input_datetime.climate_[[area]]_[[day]]_[[timing]]_end
- type: section
label: Temperature
- type: custom:slider-entity-row
entity: input_number.climate_[[area]]_[[day]]_[[timing]]
full_row: true
That's correct, the service call is not supported on the main entity at the moment. I'll try to get that implemented in the near future.
Thank you very much :)
Off-topic, but what are you using to handle the templating in the example above (climate_[[area]]_[[day]]_[[timing]]
)?
Config Template Card: https://github.com/iantrich/config-template-card
Correction, in that specific case it was the Decluttering Card: https://github.com/custom-cards/decluttering-card Which does have some variables function which you can "pass on" the template you create so that it uses them (basically to allow you to create a template and pass the information you want to elaborate as variables, allowing you to use it multiple times for different reasons).
Sorry about the confusion.
Implemented tap_action on main entity and moved sub entities service configuration into tap_action too, so to better match the default lovelace card configs.
Thanks!
It's working perfectly, except one thing :)
If I click on the "T7" I correctly got the popup, while if I click on the icon on the left I got the standard popup:
I think the icon should be part of the "main entity" tap_action ;)
I just added the tap action on the state value itself because that is the way all other entity-rows behave. Try clicking on a default row and more-info
dialog is shown on the icon and name, while an action (or nothing) is activated on a state click.
mmmh, not 100% sure to be honest. I do have an entity card where I set the tap_action to "none" and that is applied for the whole thing (including icon and name).
I tried to change it to more-info and I do have the popup on the icon and name, but oddly enough not on the state (person entity)
In the multiple-entity card it's happening the opposite somehow, I got the right popup on the state (T7 in the previous screenshot) and the "more-info" if I click on "thermostat" (text) and the icon
Hi there, first of all, thanks for this card, it is very useful for my current project :)
I would like to ask if it would be possible to have the "tap_action" to work for each defined entity so that I can decide nothing have to happen, or more spefiically for my case, to open a browser_mod.popup using call-service
Here what I am trying now:
Unfortuntately for now it seems that it is completely ignored, even if I set on each other entity to do nothing:
Would that be possible to integrate?
Thanks Andrea