-
Notifications
You must be signed in to change notification settings - Fork 32
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
Using Home Assistant API instead of MQTT #34
Conversation
Thanks for the PR! It will unfortunately conflict with changes from #33, so either we can hold it off until that one is merged, or you can rebase it to use that PR's branch as base, so we can move on faster once it's merged (as I'd like to merge that one first, sunce it doesn't introduce any breaking changes like this one). Also note that the new add-on that @joBr99 is currently working on and is supposed to replace the AppDaemon backend doesn't implement the API support yet, so it's something that should be looked into as well. |
Implemented support for the API yesterday evening :) |
Is this still supposed to work? I did the following:
But I'm still seeing "Waiting for content". ESPHome boots up and I see the logs (also the one about successful connection - see below). Switching
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, I will not be able to take this further. Let me know if I should close the PR for simplicity or sy would like to take this over. |
Based on the already merged PR to joBr99/nspanel-lovelace-ui#1007 I would love to see the use of HA API.
It results in smoother and faster communication through HA events and HA services.
esphome needs small config change, optional new/renamed triggers
nspanel.cpp automatically adds necessary HA service that the appdaemon backend can call (customrecv, updatetft, gerversion)
======
Afterwards HA ESP device needs explicit permission to use service calls.
![image](https://private-user-images.githubusercontent.com/4489389/287387265-d9b75ab5-d4ee-4604-a79f-f5f23f746b28.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2ODU3MTUsIm5iZiI6MTczOTY4NTQxNSwicGF0aCI6Ii80NDg5Mzg5LzI4NzM4NzI2NS1kOWI3NWFiNS1kNGVlLTQ2MDQtYTc5Zi1mNWYyM2Y3NDZiMjgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTZUMDU1NjU1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODljOTUxODNmNmEzYWYyMTBjMjM1Mzc0ZTFhMzJiNWE0ZWY4NjRjNWEyNThiZDExZGE3NTk3OWMzODJlOTBiYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.i3PoEtXrIE9CVXkpHxK_DLilSITYh-FO7KMSMklUcBM)