in HA use the developers tools and then states to find your existing entities.
the switch is or not setup right in HA and doesnt exist there or it has a different name then you expect.
I fix the code and the switch don’t show ,what I see it that
what is "widget definition not found"??
on the first install it work and I see “Hello world” on the dashboard ,I play on the code and now I have this !
your dashboard file is all wrong.
its a yaml type file.
so you need to look at your indentions.
no extra spaces in front of the widget name
no extra spaces in fron of layout
all indentions need to be the same
so: 2 spaces in front of widget_type, etc. 2 spaces in front of the line beneath layout
always 1 space behind every - and :
There is no difference between a ‘normal’ switch and an ‘mqttt switch’ to HA Dashboard, regardless of which switch you are adding the main.yaml file has to be correctly formatted as Rene said earlier.
keith has given you the right way to do it TWICE!
but you need to learn YAML first!!
you cant do anything with HA or the dashboard if you dont know what to do in YAML.