Open afarago opened 7 months ago
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:
use_api: True
to nspanel_lovelace
mqtt
apps.yaml
use_api: True
panelName: "Media room panel"
(tried values from esphome.name, esphome.friendly_name, nspanel_lovelace.id)panelDeviceId: "<32-character long hex id from device page URL>"
panelRecvTopic
and panelSendTopic
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 use_api
to False and restoring commented out mqtt lines makes it work again.
[21:39:11][D][api:102]: Accepted 192.168.1.2
[21:39:12][D][api.connection:1121]: Home Assistant 2024.1.5 (192.168.1.2): Connected successfully
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://github.com/sairon/esphome-nspanel-lovelace-ui/assets/4489389/d9b75ab5-d4ee-4604-a79f-f5f23f746b28)