When I setup a new device, I need to be able to fill in the AppriseURL and Label. These are then used to query the webserver to determine the enum values for Service.
Today I'm using:
preferences {
input("AppriseUrl", "text", title: "Apprise Server URL:", description: "[ip address][:port]/")
input(name: "service", defaultValue: "DavidEmail", type: "enum", multiple: true, title: "Service", options: ["DavidEmail","DavidText"])
input("label", "text", title: "Label:", description: "Name of tag within Apprise database to define valid services")
input("Subject", "text", title: "Subject:", description: "")
}
I have a function that uses the Service/Label information and creates an arrayList of the valid services. I would like the preferences enum type to be updated with this arrayList.
I've no idea how to do this. I can get things to work by statically setting the services, but that defeats the purpose as each unique device created will have different valid services.
Any pointers? Is this even possible?
thanks,
david