hass-agent / HASS.Agent

Unofficial development project for the HASS.Agent platform.
https://hass-agent.io
MIT License
303 stars 8 forks source link

Bug: Playing Automation with a Quick Action doesn't work. #117

Open SerinitySW opened 2 months ago

SerinitySW commented 2 months ago

Describe the bug Quick Actions don't seem to be able to play/run an automation manually. It has no problem turning them on and off, but you can't make an automation run.

To Reproduce Steps to reproduce the behavior:

  1. Open HASS.Agent Quick Actions Config
  2. Add New
  3. Automation > Select entity > Set Desired Action to "Play"
  4. Either run with a hotkey or manually

Expected behavior Simply running the automation when you execute the quick action would be wonderful :)

Screenshot image

Misc info (please complete the following information):

Please check what's applicable (multiple answers possible):

Additional context image

Logs [2024-07-11] HASS.Agent_20240711.log

SerinitySW commented 2 months ago

As a temporary workaround, I've created a toggle helper and then set it to true when running the quick action. That then triggers the automation, which turns the toggle back off when it is done. Requested button helper support in #118.

amadeo-alex commented 2 months ago

Ok, tested, and replicated the issue. Looks like it's something I'd need to update HADotNet library - doable as I've seen the "/api/services/automation/trigger" REST API endpoint but I can't put exact date on the implementation. Will keep you posted.

amadeo-alex commented 2 months ago

Implemented, will be part of 2.1.0-beta3 and full 2.1.0 releases.