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

/api/custom show {} if no Custom Entities configured instead of an error #1297

Closed
proddy opened this issue Sep 17, 2023 Discussed in #1294 · 2 comments
Closed

/api/custom show {} if no Custom Entities configured instead of an error #1297

proddy opened this issue Sep 17, 2023 Discussed in #1294 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@proddy
Copy link
Contributor

proddy commented Sep 17, 2023

Discussed in #1294

Originally posted by harvey637 September 14, 2023
Hi,
the iobroker adapter for ems-esp requested until v 2.4.0 for "custom" entities,
I guess, that the resposnse to that request somehow changed with the "new" 3.7.0-dev0,
at least I did not spot the logging of this error before.
In the ems-esp-iobroker-adapter this was remedied with introducing v2.4.1 with the switch to turn on/off the call for custom entities.
tp1de/ioBroker.ems-esp#34

May be it is a better way to answer the api call to not existing entities (like custom entities, analogue sensors, ...) with "INFO" and the answer "nothing configured for <api-call customs|sensor|analogue|...>" instead of errors.

just my idea - no problem today, as v2.4.1 has this configurable.

Thank You+++
Harvey

@proddy
Copy link
Contributor Author

proddy commented Sep 17, 2023

So the change here is that when you have no Custom Entities configured, a call to http:///api/custom/ should return an empty JSON {} and not log an Error with the message "unknown device".

@proddy proddy added the enhancement New feature or request label Sep 17, 2023
@proddy proddy added this to the v3.6.2 milestone Sep 17, 2023
proddy added a commit to proddy/EMS-ESP32 that referenced this issue Sep 17, 2023
@proddy
Copy link
Contributor Author

proddy commented Sep 17, 2023

did a PR with this change (3.6.2-dev-1). Now if there are no custom entities it'll come back with a message 'no entities'.

proddy added a commit that referenced this issue Sep 19, 2023
some refactoring and change #1297
@proddy proddy closed this as completed Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant