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