Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State-dependent actions #850

Open
hilburn opened this issue May 24, 2024 · 1 comment
Open

State-dependent actions #850

hilburn opened this issue May 24, 2024 · 1 comment
Labels
FR Feature Request

Comments

@hilburn
Copy link

hilburn commented May 24, 2024

I have a button which I would like to call different services on tap_action depending on state.

Ideally the current action format could be implemented in the state list, along with color, icon, styles etc

Current;y I have implemented the following with templates for which service/targets to use:

tap_action:
  action: call-service
  service: >-
    [[[ if (variables.boost_on) return "schedule_state.clear_overrides"; else
    return "input_button.press" ]]]
  data: {}
  target:
    entity_id: >-
      [[[ if (variables.boost_on) return "sensor.heating_schedule"; else return
      "input_button.heating_boost" ]]]

Which works ok for the moment, but could see getting rather unwieldy with more than 2 states, or more difficult if e.g. wanting to target a label rather than an entity in one of the states

@hilburn hilburn added the FR Feature Request label May 24, 2024
@beringtom
Copy link

2nd this! Using a toggle action on blinds with tilt needs a script or automation to trigger it,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FR Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants