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

[Home Assistant] Support calling Services. #11487

Open
frakman1 opened this issue Mar 25, 2024 · 14 comments · May be fixed by #13472
Open

[Home Assistant] Support calling Services. #11487

frakman1 opened this issue Mar 25, 2024 · 14 comments · May be fixed by #13472
Assignees
Labels
extension: homeassistant Issues related to the homeassistant extension extension Issues related to one of the extensions in the Store feature request New feature or improvement

Comments

@frakman1
Copy link

Extension

https://www.raycast.com/tonka3000/homeassistant

Description

I have defined shell command services within HA e.g.

# Exposes service shell_command.xxxx
shell_command:
  print_date: touch /tmp/$(date +"%m_%d_%Y")
  snapshot_nest_frontdoor: /bin/bash -c /config/nest_snapshot.sh
  reset_modem: curl -u xxx:'xxx' --location --request GET 'http://xxx/overview?reset=Reset' 

These are all callable within HA from automations or the dashboard. e.g.
image

It would be nice if I can call my HA services from within Raycast since most apps that use the HA API support calling services.

I realize that many services have associated input that might be hard to implement in an Extension but these services I am making take no input.

Who will benefit from this feature?

Additional functionality into HA

Anything else?

No response

@frakman1 frakman1 added extension Issues related to one of the extensions in the Store feature request New feature or improvement labels Mar 25, 2024
@raycastbot raycastbot added the extension: homeassistant Issues related to the homeassistant extension label Mar 25, 2024
@raycastbot
Copy link
Collaborator

Thank you for opening this issue!

🔔 @tonka3000 @altrdev @rspeicher @amuelli you might want to have a look.

💡 Author and Contributors commands

The author and contributors of tonka3000/homeassistant can trigger bot actions by commenting:

  • @raycastbot close this issue Closes the issue.
  • @raycastbot rename this issue to "Awesome new title" Renames the issue.
  • @raycastbot reopen this issue Reopen the issue.

@raycastbot
Copy link
Collaborator

This issue has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 10 days to keep our backlog clean 😊

@raycastbot raycastbot added status: stalled Stalled due inactivity and removed status: stalled Stalled due inactivity labels May 14, 2024
@tonka3000
Copy link
Contributor

So you wanna have a Raycast command which list the service to call, right?

That is quite tricky to implement as you already mentioned.

Currently I have no time to implement but of course such a command would be quite helpful. Maybe also with deep link support to make it possible to have it as root commands.

@frakman1
Copy link
Author

I understand. Thank you for your response. I'll be happy to test it if this gets implemented one day.

@raycastbot
Copy link
Collaborator

This issue has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 10 days to keep our backlog clean 😊

@raycastbot raycastbot added the status: stalled Stalled due inactivity label Jul 3, 2024
@raycastbot
Copy link
Collaborator

This issue has been automatically closed due to inactivity.

Feel free to comment in the thread when you're ready to continue working on it 🙂

You can also catch us in Slack if you want to discuss this.

@raycastbot raycastbot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 13, 2024
@tonka3000 tonka3000 linked a pull request Jul 14, 2024 that will close this issue
5 tasks
@tonka3000
Copy link
Contributor

@frakman1 I've now implemented a first version of services, see the linked PR.

If you like you can test it. I got the UI version workin as well, so you can switch between yaml and ui mode like on home Assistant itself.

There are many edge cases an currently many checks are not implemented, but at least I found a way to support it. I only support entities as target, device and the others needs to be added.

@tonka3000
Copy link
Contributor

@raycastbot assign me

@tonka3000
Copy link
Contributor

@raycastbot reopen this issue

@raycastbot raycastbot reopened this Jul 14, 2024
@raycastbot raycastbot removed the status: stalled Stalled due inactivity label Jul 14, 2024
@frakman1
Copy link
Author

I'll take a look when I get a chance. Thank you for working on this!

@frakman1
Copy link
Author

How do I test this feature?
I have the latest version of Raycast. Is there an option to upgrade the HA extension or do I have to uninstall and install it? If I have to update something manually, then please let me know what file(s) I need to update.
Thank you!

@tonka3000
Copy link
Contributor

@frakman1 You just need to checkout the branch. After that open the terminal and CD into the homeassistant folder in the extensions folder.

Call npm ci and then npm run dev. You should be now be able to see a second home assistant extension. Configure it as usual and you should be able to test it.

@frakman1
Copy link
Author

frakman1 commented Jul 19, 2024

Why is the repo that big (7.8 GB?) Source code repos shouldn't be this large.
I gave up on cloning a single branch after about half an hour

$git clone --branch ha-update-weather --single-branch https://github.com/tonka3000/extensions
Cloning into 'extensions'...
remote: Enumerating objects: 128245, done.
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 100% (18/18), done.
Receiving objects:  17% (22843/128245), 1.33 GiB | 3.31 MiB/s

@tonka3000
Copy link
Contributor

@frakman1 Yeah, the raycast repo is very large. You should be able to use sparse checkout to just clone the home assistant folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension: homeassistant Issues related to the homeassistant extension extension Issues related to one of the extensions in the Store feature request New feature or improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants