Dashboard with context variables

I have a dashboard where each block is using a deviceId context variable.
I’m passing those context variables in a URL link.
If these context variables are missing or are incorrect, the dashboard will still show data that seems to be the data from the device specified in the “default value” in the dashboards context manager.

Is it supposed to be that way?

I don’t see a way to not specify a default value.

dashboard 5e3af44011e93d00078d7cbb

That is the intended behavior, although I am seeing use cases where that may not be desired. There are a couple of work-arounds:

  1. Create a dummy device and set that to the default. This way when it does fall back, it will not fall back to an actual device. When you’re editing the dashboard, you can use the dropdown to change the context variable so you can preview with actual data.
  2. Wrap your dashboard in an experience. This is my most common solution. This allows a workflow to validate whether the device exists and whether the current user should be allowed to see it. If either of those are false, you’d redirect them back to the login page or show a 404 message.