Based on the value measured by the hubs ambient light sensor, one of the categories is reported.
constonAmbientLightStateChange= (value:AmbientLightState, timestamp?:Date) => {console.log(value, timestamp);};COBI.hub.ambientLightState.read(onAmbientLightStateChange); // Instantly get the current valueCOBI.hub.ambientLightState.subscribe(onAmbientLightStateChange);COBI.hub.ambientLightState.unsubscribe(onAmbientLightStateChange);
constonAmbientLightStateChange= (value, timestamp) => {console.log(value, timestamp);};COBI.hub.ambientLightState.read(onAmbientLightStateChange); // Instantly get the current valueCOBI.hub.ambientLightState.subscribe(onAmbientLightStateChange);COBI.hub.ambientLightState.unsubscribe(onAmbientLightStateChange);