Merge branch '88-fix-dimmable-state' into 'dev'

fix dimmable state

Closes #88

See merge request sa4-2020/the-sanmarinoes/frontend!103
This commit is contained in:
Claudio Maggioni 2020-04-28 11:02:46 +02:00
commit 361c82c264

View file

@ -378,10 +378,10 @@ export const RemoteService = {
updateState: (data, type) => {
return (dispatch) => {
let url;
if (type === "dimmableState") {
url = "/dimmableState";
} else {
if (data.on) {
url = "/switchableState";
} else {
url = "/dimmableState";
}
return Endpoint.put(url, {}, data)