Skip to content

Executing script / shell command on long-press via "service_call" #12

@swanitzek

Description

@swanitzek

Hello,

I want to execute a script after the "Off" button of my Hue Dimmer switch has been pressed. It looks like executing a script via the action_type "servie_call" is not supported or do I miss something?

apps.yaml

dimmer_livingroom:
  module: hue_dimmer_switch_deconz
  class: HueDimmerSwitch
  entities:
    switch: dimmer_switch
    light: light.wohnzimmer
  transitiontime: 1
  advanced:
      long_press_off_release:
      action_type: service_call
      entity: script.turn_off_tv

scripts.yaml:

turn_off_tv:
    sequence:
      service: shell_command.tv_off

configuration.yaml

shell_command:
  tv_off: python3 -m samsungctl --host=192.168.x.x --name HomeAssistant KEY_POWEROFF

Executing the script via Lovelace works like a charm. Is there any way to implement the functionality?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions