I’m trying to use entity-button in lovelace to do the same thing. The editor accepts the following code, but the “message” value isn’t getting sent. The script is being called, however.
It looks like your script definition is lacking the fields list. (See https://www.home-assistant.io/integrations/script/.) Without them, I believe your button can send the parameter (message), but the script drops it on the floor.
For what it’s worth, I now believe the fields: property is optional, and is probably only used to display help text. (Somewhere?) Or maybe it’s the equivalent of a structured comment.
I have two scripts that are nearly identical (arrival/departure notifications), but I forgot to copy/paste the fields: property from one to the other (for a message variable). And the one that omits fields: works just the same as the one that does.
The script integration doc doesn’t actually explain the purpose of the fields: property. It just describes it as an optional map, with a default value of {} (empty map). Based on my accidental experiment, it doesn’t appear to have an effect on actual script execution.
(If someone wants to answer a few questions, I’d be happy to augment the doc here.)