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

JsonDecoderException if double press helper is not a valid json #45

Closed
1 task
eloo opened this issue Apr 23, 2021 · 4 comments · Fixed by #32
Closed
1 task

JsonDecoderException if double press helper is not a valid json #45

eloo opened this issue Apr 23, 2021 · 4 comments · Fixed by #32
Labels
blueprint An issue related to a blueprint bug Something isn't working

Comments

@eloo
Copy link

eloo commented Apr 23, 2021

Thank you for taking the time to report here! 🎉

Please don't delete any part of the template, since keeping the provided structure will help maintainers to process your request more rapidly.

This template should only be used to report a bug with a blueprint. If this is not your case, you can choose a different issue template. If you have a question instead, please open a discussion here.

*=required

Bug Details*

  • Blueprint name: Maybe all
  • Home Assistant Core Version: no relevant
  • Home Assistant Installation Type not relevant

Description*

If a double press helper is configured and this helper has a non-json value the automation (controller) is not working because a jsondecoder expection is working.

I would suggest to catch such a case and maybe simple ignore this error and handle it the same as the helper is empty or throw a proper error which makes clear the helper is in an incompatible state and should be checked or cleared.

Automation YAML config*

The YAML code for the automation you're having problems with. This will allow to reproduce your issue.

To Reproduce*

Steps to reproduce the issue:

  1. Create helper for double press
  2. Fill helper with random string
  3. Trigger the automation with has double press enabled (i use the shortcut blueprint)
  4. See error in traces

Expected behavior*

  • Ignore the invalid content and replace it with a new one
  • Expose a proper error which indicates the real error (helper is in invalid state)

Actual Behaviour*

Automation is not working.

Additional Details*

  • I'd like to help developing a fix for this issue.

Screenshots

Additional context

Thanks
eloo

@eloo eloo added blueprint An issue related to a blueprint bug Something isn't working labels Apr 23, 2021
@EPMatt
Copy link
Owner

EPMatt commented Apr 23, 2021

Hi @eloo,

thank you for reporting here. Are you experiencing this issue with the E1812 blueprint in main or the one proposed in #32?
If you're using the blueprint from the PR linked above (I'm pretty sure you are referring to it) I think we should solve this issue before making the feature publicly available.

Thanks!

@eloo
Copy link
Author

eloo commented Apr 23, 2021

@EPMatt
i have tested this with the code from #32 yes and with the E1812 blueprint.
And yes sounds like a good idea to fix this first ;)

@EPMatt
Copy link
Owner

EPMatt commented Apr 23, 2021

Hi @eloo,

Ok, I'll take a look at it before merging the PR. :)
Thank you for reporting.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

Hi there,

🔒 This issue has been automatically locked since there has not been any recent activity after it was closed.
Please open a new ticket for related bugs.

Thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blueprint An issue related to a blueprint bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants