You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the esmodules branch (or the default branch with this patch applied, so it can import discovery)
Everything works fine, but if I switch a light off (or toggle it), it sets its bri state to 1...
I tried to debug it, but the library's flow is really hard to follow...
However, I can reproduce it with a simple example (mostly from the examples directory):
letxAPI;// just use this as cache for nowv3.api.createLocal(host).connect(USERNAME).then(api=>{xAPI=api;returnapi.lights.getLightState(LIGHT_ID);}).then((state)=>{// Display the state of the lightconsole.log(state);returnxAPI.lights.setLightState(LIGHT_ID,{on: !state.on,transitiontime: 2});}).then(api=>{returnxAPI.lights.getLightState(LIGHT_ID);}).then((state)=>{// Display the state of the lightconsole.log(JSON.stringify(state,null,2));});
I am using the
esmodules
branch (or thedefault
branch with this patch applied, so it can importdiscovery
)Everything works fine, but if I switch a light off (or toggle it), it sets its
bri
state to1
...I tried to debug it, but the library's flow is really hard to follow...
However, I can reproduce it with a simple example (mostly from the examples directory):
or a bit less 'then':
Anyone out there seeing the same problem? (Or any hint what else the problem could be?)
The text was updated successfully, but these errors were encountered: