jimmywarting / wemo-client

JavaScript client library for controlling and subscribing to Wemo Devices
MIT License
132 stars 40 forks source link

Don't turn on the light when setting brightness #68

Closed leeliu closed 2 years ago

leeliu commented 4 years ago

Similar to wemo app functionality. This allows for resetting of daytime brightness levels programmatically w/o turning on lights.

jimmywarting commented 2 years ago

What if we did this instead:

so something like this:

  const settings = brightness === 0 
    ? { BinaryState: 0 } 
    : { brightnes }
  await this.soapAction('urn:Belkin:service:basicevent:1', 'SetBinaryState', settings)
leeliu commented 2 years ago

Yup I think that works...updated PR