Dashticz / dashticz_v2

Alternative dashboard for Domoticz
107 stars 62 forks source link

Switching scenes always on and ES6 fix #344

Closed aiolos closed 6 years ago

aiolos commented 6 years ago

I made a fix for the issue that scenes are switched.

If a scene was already in the on state, it was not possible to enable the scene again (for example to trigger the script attached to this scene again). This is now solved, scenes will only be set to on

Also, it turned out dashticz didn't work on my iPad anymore (and probably other devices). I commented the newly added code from @lokonli (Added in commit https://github.com/Dashticz/dashticz_v2/commit/4d5822515bbe3449b4d03423ebc92a6e1e05e94c)

I commented this code again, now it works again, but I'm not sure if it has any implications. (I think the problem happens because the Number()-function is available in ES6, which might not be available on Safari or something like that.)

In the latest commit the issue with older browsers is fixed, changing const to var

lokonli commented 6 years ago

I commented this code again, now it works again, but I'm not sure if it has any implications. (I think the problem happens because the Number()-function is available in ES6, which might not be available on Safari or something like that.)

It's the 'const' keyword.

aiolos commented 6 years ago

That's also very likely. I'll try it later today.

aiolos commented 6 years ago

with var it works!