public function edit($name, $duration, $useDuration, $useDisplayLocation, $longitude, $latitude, $templateId, $units, $updateInterval, $lang, $dayConditionsOnly, $widgetId)
    {
        $this->userId = $this->getEntityProvider()->getMe()->getId();
        $this->name = $name;
        $this->duration = $duration;
        $this->useDuration = $useDuration;
        $this->useDisplayLocation = $useDisplayLocation;
        $this->longitude = $longitude;
        $this->latitude = $latitude;
        $this->templateId = $templateId;
        $this->units = $units;
        $this->updateInterval = $updateInterval;
        $this->lang = $lang;
        $this->dayConditionsOnly = $dayConditionsOnly;
        $this->widgetId = $widgetId;
        $this->getLogger()->info('Editing Weather widget ID ' . $widgetId);
        $response = $this->doPut('/playlist/widget/' . $widgetId , $this->toArray());

        return $this->hydrate($response);
    }