Skip to content
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

Extend service settings with GUI options in HA #18

Merged
merged 3 commits into from
Mar 17, 2022
Merged

Extend service settings with GUI options in HA #18

merged 3 commits into from
Mar 17, 2022

Conversation

nagyrobi
Copy link
Contributor

...and add chunk_size option too

@dummylabs
Copy link
Owner

dummylabs commented Mar 17, 2022

@nagyrobi Thanks, this should be handy. Is there a way to edit "Notification service data" parameter so that it's sent to the service as yaml dictionary? If this is not possible via UI, this option should be hidden in my opinion. So far this field holds [object Object] which is not editable.

@nagyrobi
Copy link
Contributor Author

Added multiline support for that text field so you can enter the parameters on new lines, like a dictionary looks like.
Needs testing which I can't do because I don't use any external notification services.

@dummylabs
Copy link
Owner

dummylabs commented Mar 17, 2022

Can I ask you to test it with persistent_notification.create which is a part of Home Assistant and requires zero configuration? It has a parameter named title which can be used for testing.
The working yaml example:

service: watchman.report
data:
  send_notification: true
  service: persistent_notification.create
  data:
    title: my title

@dummylabs
Copy link
Owner

dummylabs commented Mar 17, 2022

so you can enter the parameters on new lines, like a dictionary looks like

As far as I see, Home Assistant transforms user input into a string, not a dictionary when you switch from UI to yaml mode. JSON mode would help here, but I don't know if it can be set for a UI field.

@nagyrobi
Copy link
Contributor Author

Yes it can only be a string, you'll have to accomodate with that.
Other way is if you have a known list of possible options, those could be listed in a dropdown box and the user would select the appropriate one.

@nagyrobi
Copy link
Contributor Author

If this is not possible via UI, this option should be hidden in my opinion

This option is hidden from GUI, remains as a yaml-option.

@dummylabs dummylabs merged commit e52d1cf into dummylabs:main Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants