zigbee2mqtt-frontend icon indicating copy to clipboard operation
zigbee2mqtt-frontend copied to clipboard

[Bug]: Toggle on the dashboard does not work and stack trace in the developer console

Open gmulders opened this issue 1 year ago • 2 comments

What happened?

When I try to toggle a on-off power plug on the dashboard, I get an error (see below).

This does not happen when using the toggle on the device/exposes tab, from there I can just toggle the plug.

What browsers are you seeing the problem on?

Chrome, Safari

Relevant stacktrace

index-fb4a4614.js:40 Uncaught TypeError: a is not a function
    at onChange (Dashboard-cc086107.js:1:3112)
    at Yt.onChange (DashboardFeatureWrapper-ef543cb2.js:1:27283)
    at Yt.onChange (DashboardFeatureWrapper-ef543cb2.js:1:27283)
    at onChange (DashboardFeatureWrapper-ef543cb2.js:1:2373)
    at i (DashboardFeatureWrapper-ef543cb2.js:1:1405)
    at Object.xye (index-fb4a4614.js:40:9864)
    at Hye (index-fb4a4614.js:40:10021)
    at jye (index-fb4a4614.js:40:10081)
    at qC (index-fb4a4614.js:40:31567)
    at EH (index-fb4a4614.js:40:31985)


### Did you download state.json.zip?

I will attach state.json.zip

gmulders avatar Apr 12 '24 09:04 gmulders

It seems that the following line breaks, because the props field does not contain the setDeviceState field:

https://github.com/nurikk/zigbee2mqtt-frontend/blob/f0a2cf573f5a2d09d8262de2ba958fd534dba55e/src/components/dashboard-page/Dashboard.tsx#L47

gmulders avatar Apr 14 '24 09:04 gmulders

Same here - Dashboard doesn't change state, whereas the devices tab does.

derekoharrow avatar Apr 17 '24 13:04 derekoharrow