Add REST client
Hey, I'm wondering if you would consider adding a REST client too. I believe some things can only be done through the REST API.
There's a good Go implementation in another project already. https://github.com/joshuar/go-hass-agent/blob/main/internal/hass/api/rest.go
We could join the efforts and make one great client to be used in go-hass-agent too. I have already started using this client for one of my other projects. 😌
What do you think, @saml-dev & @joshuar?
Hey, gome-assistant already uses the REST API internally to retrieve entity states. What is it that you're trying to do with gome-assistant that you can't?
Personally, I want to register entities.
My use case is that I'd like to list all entities so that I don't need to hard code the names and make them more discoverable. I'm happy to add list endpoint to the API myself
@zimnyjakub thanks for the PR, I'll take a look but at first glance it looks good to me. How do you plan to utilize it to avoid hard coding entity names? If you're up for it, #9 has been open for a while which would use code generation to create some kind of constants file. I've never set up code generation in Go myself so I'm not sure what it entails
I want to use this library to create a discord bot to manage HA, a pet project - one of the features I want to implement is to add lights to a room from a channel; so for example i'd like to list entities first to find which one i can add to a room(channel)
Its just a pet project 🙃
Personally, I want to register entities.
@metalmatze I think this is something we could expose in gome-assistant rather than just directly exposing the HTTP client itself. PRs welcome if you want to tackle it 😁
Hi, I apologize for the long silence. In the end, I realized what I really wanted was a custom integration to talk to from within HASS. I now have a small Python app that I load, which then communicates with my server, although not in Go, but in Rust for learning purposes. Could have been Go, though.
Cool! Is it open source? If so drop a link 😁