Closed aschor closed 1 year ago
+1 from me. I am trying to hack my way around this, as I don't want to hardcode the triggers_update list. It's trivial to send it as a variable into the card.
:tada: This issue has been resolved in version 4.1.0-dev.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 4.1.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Anyone get this to work? I tried it now but it still seems to be just checking the main entity for updates. Here's my code (I added the logs afterwards):
triggers_update: >
[[[
const lights_in_area = variables.get_lights_in_area(this._config.name);
console.log("Triggers update: " + this._config.name);
console.log(lights_in_area);
return lights_in_area;
]]]
This is the return value log: ['light.kitchen_counter_lights', 'light.kitchen_lights'] Yet it's still only updating when I update the state of the card entity.
Is your feature request related to a problem? Please describe. the "triggers_update" configuration does not accept javascript templates, according to the docs. Yet, I would like to update my card on every battery powered SENSOR update (not bynary), even if I add a new sensor in home assistant, and I cannot find a way to :
Describe the solution you'd like triggers_update would ideally interpret javascript templates an interpret some output, like a string representing a list of the entity_ids I want tu update with
Describe alternatives you've considered the only way I found is write mannually all my sensors in the list (in a template), but if I add a new battery powered sensor I'm screwed if I forget to update the list in the config
Additional context the card I'm trying to do (a cleaner view of an auto-entities):
for now, I'm using this code ... :