Hello,
It would be great if this extension automatically retrieved the credentials available in HA similarly to the Zigbee2MQTT extension.
This can be done using the Homeassistant Services API: Here are related docs:
https://developers.home-assistant.io/docs/add-ons/communication#services-api
This requires two changes:
-
We need to define the services field in the config.json file.
Here is example code from Z2M addon:
https://github.com/zigbee2mqtt/hassio-zigbee2mqtt/blob/f8e493f2c4610d6f062b6d1082e18f3d53e8d5a6/zigbee2mqtt/config.json#L10-L12
Here are docs about services property:
https://developers.home-assistant.io/docs/add-ons/configuration#optional-configuration-options
-
In entrypoint we need to read the necessary credentials and configure environment variables.
Here is example code from Z2M addon:
https://github.com/zigbee2mqtt/hassio-zigbee2mqtt/blob/f8e493f2c4610d6f062b6d1082e18f3d53e8d5a6/common/rootfs/docker-entrypoint.sh#L94-L102
Let me know if you're interested and I'll make a contribution.
Hello,
It would be great if this extension automatically retrieved the credentials available in HA similarly to the Zigbee2MQTT extension.
This can be done using the Homeassistant Services API: Here are related docs:
https://developers.home-assistant.io/docs/add-ons/communication#services-api
This requires two changes:
We need to define the
servicesfield in theconfig.jsonfile.Here is example code from Z2M addon:
https://github.com/zigbee2mqtt/hassio-zigbee2mqtt/blob/f8e493f2c4610d6f062b6d1082e18f3d53e8d5a6/zigbee2mqtt/config.json#L10-L12
Here are docs about
servicesproperty:https://developers.home-assistant.io/docs/add-ons/configuration#optional-configuration-options
In entrypoint we need to read the necessary credentials and configure environment variables.
Here is example code from Z2M addon:
https://github.com/zigbee2mqtt/hassio-zigbee2mqtt/blob/f8e493f2c4610d6f062b6d1082e18f3d53e8d5a6/common/rootfs/docker-entrypoint.sh#L94-L102
Let me know if you're interested and I'll make a contribution.