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:
commit
361c82c264
1 changed files with 3 additions and 3 deletions
|
@ -378,10 +378,10 @@ export const RemoteService = {
|
||||||
updateState: (data, type) => {
|
updateState: (data, type) => {
|
||||||
return (dispatch) => {
|
return (dispatch) => {
|
||||||
let url;
|
let url;
|
||||||
if (type === "dimmableState") {
|
if (data.on) {
|
||||||
url = "/dimmableState";
|
|
||||||
} else {
|
|
||||||
url = "/switchableState";
|
url = "/switchableState";
|
||||||
|
} else {
|
||||||
|
url = "/dimmableState";
|
||||||
}
|
}
|
||||||
|
|
||||||
return Endpoint.put(url, {}, data)
|
return Endpoint.put(url, {}, data)
|
||||||
|
|
Loading…
Reference in a new issue