How to pass `target` when calling a service?
See original GitHub issueI believe recent Home Assistant versions added support for target
when calling a service:
- https://github.com/home-assistant/home-assistant.io/pull/15891/files
- https://www.home-assistant.io/blog/2021/03/03/release-20213/#new-ui-for-service-calls
- https://github.com/home-assistant/home-assistant.io/issues/16992
However, I can’t find a way to do so when using this custom component. The following example works in the developer tools page:
service: light.turn_on
data:
transition: 60
color_temp: 450
brightness_pct: 100
target:
entity_id:
- light.foo
- light.bar
And the following code works using the built-in buttons
type:
type: entities
entities:
- type: buttons
entities:
- entity: light.bedroom_lights
name: 1min
icon: 'mdi:lightbulb-on'
tap_action:
action: call-service
service: light.turn_on
service_data:
transition: 60
color_temp: 450
brightness_pct: 100
target:
entity_id:
- light.bedroom_lights
- light.foobar
…
But I am unable to add target
to custom:paper-buttons-row
.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (5 by maintainers)
Top Results From Across the Web
how to pass e.target value when i call the same function ...
Then you just invoke this checkValidation function whenever you need to validate something. Remember to refactor your code in events object.
Read more >Target Endpoint/Server callout - Google Cloud Community
Solved: I need to make a callout to Target Endpoint or Target Server in one of my flows and apply load balancing rules....
Read more >Service Calls - Home Assistant
Passing data to the service call. You can also specify other parameters beside the entity to target. For example, the light.turn_on service allows ......
Read more >PutTargets - Amazon EventBridge - AWS Documentation
Set that account's event bus as a target of the rules in your account. To send the matched events to the other account,...
Read more >FAQs - Jobs at Target
Login to Workday, select the “Career” app from the home page, then “Careers at Target – Current Job Openings” to view and apply...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, I’ve already reported it: https://github.com/home-assistant/home-assistant.io/issues/16992
@denilsonsa If you’d like to help, you could test if my changes work as you’d expect. I set up my so that it can be installed as a custom HACS repository (for personal testing purposes) https://github.com/ristomatti/lovelace-paper-buttons-row