Update script helper constructor parameters (#38763)
Add domain and make it and name required. Add optional running_description.
This commit is contained in:
parent
fbf44b37a9
commit
716fa63e73
20 changed files with 194 additions and 100 deletions
|
@ -70,7 +70,8 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
on_action = config.get(CONF_ON_ACTION)
|
||||
|
||||
client = LgNetCastClient(host, access_token)
|
||||
on_action_script = Script(hass, on_action) if on_action else None
|
||||
domain = __name__.split(".")[-2]
|
||||
on_action_script = Script(hass, on_action, name, domain) if on_action else None
|
||||
|
||||
add_entities([LgTVDevice(client, name, on_action_script)], True)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue