Aporeciate your contribution, but this doesn’t help at all in my opinion.
It says “is not expected or supported by the visual editor”, which only tells me that it doesn’t show up in the visual editor, not that it is wrong code. There’s also lots of other stuff that is not supported by the visual editor, but works just fine.
I still think it is an improvement to what we had before (e.g. missing keys are now clearly marked, as is general card type support, more details in the PR). Never said it’s perfect, but took enough time to get to this stage. There might be sensible ways to distinguish further, but with the MVP approach, I did not want to over complicate things. But this is getting off-topic (admittingly started by myself …).
I can only guess here: For scripts and automations it is clear that the data belongs to the service/action/… (so data is clear enough). But in the frontend scenario, the original developer probably wanted to make it clear that this data only relates to the service call and is not relevant e.g. for navigate or url actions hence service_data.
As I said, I appreciate your contribution
I took a look at your PR and I think an incorrect key should also be a config error in red like the ones about “url_path” is missing etc… This would make it clear that it’s an error and not just “not supported by the UI editor”, because this is misleading. What do you think about this?
That might be tricky with custom cards, since they can require keys that HA does not know about. I think that is why the warning approach was originally taken for that.
For internal cards a more strict approach might work in theory, but currently the error handling logic does not know what kind of GUI element triggered the error. Also I think the GUI does not know which parameters are not expected and which are just not supported in the visual editor. This distinction does not exist currently as far as I am aware.
Lastly, the error might also be coming from an automation editor which also needs to be taken into account.
So all in all, not so straight forward as it might look…at least from where I am sitting right now .