code: async def set_config(self, on=None, tholddark=None, tholdoffset=None):
          
          data = {
              key: value for key, value in {
                  'on': on,
                  'tholddark': tholddark,
                  'tholdoffset': tholdoffset,
              }.items() if value is not None
          }
  
          await self._request('put', 'sensors/{}/config'.format(self.id),
                              json=data)
docs: Change config of a CLIP LightLevel sensor.