@runtimevic You probably need to add the Newtonsoft.json package: https://docs.unity3d.com/2020.1/Documentation/Manual/com.unity.nuget.newtonsoft-json.html
solution: JSON .NET For Unity
I’ll add it to the readme
solution: JSON .NET For Unity
Hello,
Configure the url & api key.
Where should the url be configured?
and where can I find the api key?
/// The Home Assistant base instance URL.
/// The Home Assistant long-lived access token.
thank you, Víctor.
To generate a password, you can add a ‘legacy_api_password’ auth provider to Home Assistant.
First add the HomeAssistant script to the scene (I use an empty GameObject).
The url and password (api key) can be configured on this HomeAssistant script (in the inspector).
Note: The debug url is used when running within Unity, the final build will use the other Url.
Hello,
This is the entry in configuration.yaml
for Home Assistant auth:
homeassistant:
auth_providers:
- type: homeassistant
- type: legacy_api_password
api_password: !secret http_password
this is what you have to put in the configuration.yaml ??
thank you, Víctor,
Looks like a connection problem.
The message indicates it received a non-json formatted response from the server (HA; probably a html error message).
I don’t understand why it gives me login error?
Thank you Victor.
already solved, change the password for a token created in long-term home assistant.
Please put it on the github so that the next person does not have this problem and difficulty.
greetings Victor
Hello,
the light does not come on, he put a button on Unity, I don’t know if it is well configured or what I am doing wrong?
Thank you Victor.
Configuration looks OK (‘light.’ is optional).
Add a light to the scene and connect it to the ‘Scene Light’ property to see if the light toggle works within Unity? Maybe you need to add the Unity Event System?
Another possibility is adding a cube with a default collider and add the HALight script with the ‘on click’ action.
Hey thanks @harriedegroot for the unity porting. Used in my project and can’t wait to show you guy what I got soon