tradfri-demo/tradfri-motion.js
// and changes the actuator state.
and changes the actuator state.
and changes the actuator state .
function updateProperties(properties) {
  debuglog('Update received: ', properties);
  var propertymap = {};
  if ('value' in properties) {
    motionstate = properties.value;
    propertymap.value = (motionstate ? true : false );
  }
  if(Tradfri) {
    tradfriHub.setDevice(
      tradfrideviceID,
      propertymap,
    )
    .then( (res) => {
      console.log("device updated", propertymap)
    });
  }
}
function updateProperties ( properties ) { debuglog ( 'Update received: ' , properties ) ; var propertymap = { } ; if ( 'value' in properties ) { motionstate = properties . value ; propertymap . value = ( motionstate ? true : false ) ; } if ( Tradfri ) { tradfriHub . setDevice ( tradfrideviceID , propertymap , ) . then ( ( res ) => { console . log ( "device updated" , propertymap ) } ) ; } }
and changes the actuator state.
and changes the actuator state .