thanks a lot for this great HA library.
I just discovered Gleam lang and am excited by it so far. I'm also a hobby developer of HA-related automation (I contributed a bit to gome-assistant and I am also writing my port of it using Zig lang). I selected your lib as the way to get familiar with Gleam lang. :)
In my fork, you can see 1st attempt to migrate this lib into the latest versions of both gleam and relevant modules:
As I'm really very new to gleam/erlang/otp, some of the changes have not been tested yet - kind of a naive/best guess attempt so far.
When trying to execute the following test:
pub fn gla_test() {
let config =
Configuration(
host: "SOME_IP",
port: 8123,
access_token: AccessToken( "SOME_TOKEN",
),
)
homeassistant.connect(config, handle_connection)
}
fn handle_connection(ha: HomeAssistant) -> HomeAssistant {
io.debug("Connecting to Home Assistant...")
ha
}
Hi @dennisschroeder
thanks a lot for this great HA library. I just discovered Gleam lang and am excited by it so far. I'm also a hobby developer of HA-related automation (I contributed a bit to gome-assistant and I am also writing my port of it using Zig lang). I selected your lib as the way to get familiar with Gleam lang. :)
In my fork, you can see 1st attempt to migrate this lib into the latest versions of both gleam and relevant modules:
As I'm really very new to gleam/erlang/otp, some of the changes have not been tested yet - kind of a naive/best guess attempt so far.
When trying to execute the following test:
I get this error:
Any idea why gun cannot send the message to HA?
Thanks!