> ## Documentation Index
> Fetch the complete documentation index at: https://developers.podero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Setting Preferences

> Configure device-specific settings and optimization preferences

# Setting Device Preferences

End-users want to stay in control of their devices while benefiting from smart optimization. This page covers the most common preference scenarios for each device type and how to implement them.

All preferences are updated via the device's `PUT` endpoint. Only send the fields you want to change — other fields remain unaffected.

## Heat Pump

### Pause optimization while away

If a user is going on vacation or doesn't want Podero to control their heat pump for a period, disable optimization. The device falls back to its own built-in schedule until optimization is re-enabled.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT \
    'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/heat-pumps/{device_id}' \
    -H 'Authorization: Bearer {auth_token}' \
    -H 'Content-Type: application/json' \
    -d '{
      "is_smart_optimization_active": false
    }'
  ```

  ```python Python theme={null}
  response = requests.put(
      f'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/heat-pumps/{device_id}',
      headers={
          'Authorization': f'Bearer {auth_token}',
          'Content-Type': 'application/json'
      },
      json={
          'is_smart_optimization_active': False
      }
  )
  ```
</CodeGroup>

### Resume optimization

When the user returns, re-enable optimization with the same endpoint:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT \
    'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/heat-pumps/{device_id}' \
    -H 'Authorization: Bearer {auth_token}' \
    -H 'Content-Type: application/json' \
    -d '{
      "is_smart_optimization_active": true
    }'
  ```

  ```python Python theme={null}
  response = requests.put(
      f'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/heat-pumps/{device_id}',
      headers={
          'Authorization': f'Bearer {auth_token}',
          'Content-Type': 'application/json'
      },
      json={
          'is_smart_optimization_active': True
      }
  )
  ```
</CodeGroup>

<Card title="Heat Pump Attributes Reference" icon="book" href="/partner-api/reference/heat-pumps/attributes">
  Full list of writable heat pump fields
</Card>

## Electric Vehicle

### Charge now

If the user needs to start charging immediately — for example, they forgot to plug in the night before and need to leave soon — trigger a boost charge. Depending on vehicle state, the boost either starts charging right away or arms itself for when the vehicle next connects.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST \
    'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/electric-vehicles/{device_id}/boost' \
    -H 'Authorization: Bearer {auth_token}'
  ```

  ```python Python theme={null}
  response = requests.post(
      f'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/electric-vehicles/{device_id}/boost',
      headers={
          'Authorization': f'Bearer {auth_token}'
      }
  )
  ```
</CodeGroup>

| Vehicle state                     | Result                                                                    |
| --------------------------------- | ------------------------------------------------------------------------- |
| Plugged in, idle                  | Starts charging immediately, bypassing optimization                       |
| Unplugged                         | Arms boost — charging starts automatically when the vehicle next connects |
| Already charging or fully charged | Returns `409` — no action needed                                          |

To cancel an armed boost before the vehicle connects:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE \
    'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/electric-vehicles/{device_id}/boost' \
    -H 'Authorization: Bearer {auth_token}'
  ```

  ```python Python theme={null}
  response = requests.delete(
      f'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/electric-vehicles/{device_id}/boost',
      headers={
          'Authorization': f'Bearer {auth_token}'
      }
  )
  ```
</CodeGroup>

### Set a charge deadline

For users with a regular commute, a charge policy ensures the vehicle reaches a minimum charge level by a set time. Podero will still optimize for cheap overnight hours, but will always meet the deadline.

Enable the policy and set a default target that applies every day:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT \
    'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/electric-vehicles/{device_id}' \
    -H 'Authorization: Bearer {auth_token}' \
    -H 'Content-Type: application/json' \
    -d '{
      "is_charge_policy_enabled": true,
      "charge_deadline_at": "07:00",
      "minimum_charge_limit": 80
    }'
  ```

  ```python Python theme={null}
  response = requests.put(
      f'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/electric-vehicles/{device_id}',
      headers={
          'Authorization': f'Bearer {auth_token}',
          'Content-Type': 'application/json'
      },
      json={
          'is_charge_policy_enabled': True,
          'charge_deadline_at': '07:00',
          'minimum_charge_limit': 80
      }
  )
  ```
</CodeGroup>

### Set a weekly schedule

When `is_charge_policy_enabled` is `true`, users can configure a different target and deadline for each day of the week via the `/charge-policy` endpoint — useful for users whose schedule varies between weekdays and weekends:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT \
    'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/electric-vehicles/{device_id}/charge-policy' \
    -H 'Authorization: Bearer {auth_token}' \
    -H 'Content-Type: application/json' \
    -d '{
      "timezone": "Europe/Berlin",
      "mon": { "charge_percentage": 80, "charge_deadline": "07:00" },
      "tue": { "charge_percentage": 80, "charge_deadline": "07:00" },
      "wed": { "charge_percentage": 80, "charge_deadline": "07:00" },
      "thu": { "charge_percentage": 80, "charge_deadline": "07:00" },
      "fri": { "charge_percentage": 80, "charge_deadline": "07:00" },
      "sat": { "charge_percentage": 50, "charge_deadline": "10:00" },
      "sun": { "charge_percentage": 50, "charge_deadline": "10:00" }
    }'
  ```

  ```python Python theme={null}
  response = requests.put(
      f'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/electric-vehicles/{device_id}/charge-policy',
      headers={
          'Authorization': f'Bearer {auth_token}',
          'Content-Type': 'application/json'
      },
      json={
          'timezone': 'Europe/Berlin',
          'mon': {'charge_percentage': 80, 'charge_deadline': '07:00'},
          'tue': {'charge_percentage': 80, 'charge_deadline': '07:00'},
          'wed': {'charge_percentage': 80, 'charge_deadline': '07:00'},
          'thu': {'charge_percentage': 80, 'charge_deadline': '07:00'},
          'fri': {'charge_percentage': 80, 'charge_deadline': '07:00'},
          'sat': {'charge_percentage': 50, 'charge_deadline': '10:00'},
          'sun': {'charge_percentage': 50, 'charge_deadline': '10:00'},
      }
  )
  ```
</CodeGroup>

To disable the charge policy entirely and return to fully cost-optimized charging:

```json theme={null}
{ "is_charge_policy_enabled": false }
```

<Card title="Electric Vehicle Attributes Reference" icon="book" href="/partner-api/reference/electric-vehicles/attributes">
  Full list of writable EV fields, including charge policy details
</Card>

## Solar Inverter

### Pause optimization

If a user wants to stop Podero from controlling their inverter temporarily, disable optimization. The inverter falls back to its own default behavior until optimization is re-enabled.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT \
    'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/inverters/{device_id}' \
    -H 'Authorization: Bearer {auth_token}' \
    -H 'Content-Type: application/json' \
    -d '{
      "is_smart_optimization_active": false
    }'
  ```

  ```python Python theme={null}
  response = requests.put(
      f'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/inverters/{device_id}',
      headers={
          'Authorization': f'Bearer {auth_token}',
          'Content-Type': 'application/json'
      },
      json={
          'is_smart_optimization_active': False
      }
  )
  ```
</CodeGroup>

### Resume optimization

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT \
    'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/inverters/{device_id}' \
    -H 'Authorization: Bearer {auth_token}' \
    -H 'Content-Type: application/json' \
    -d '{
      "is_smart_optimization_active": true
    }'
  ```

  ```python Python theme={null}
  response = requests.put(
      f'https://app.podero.com/api/partners/v2.0/org/{org_id}/users/{user_id}/inverters/{device_id}',
      headers={
          'Authorization': f'Bearer {auth_token}',
          'Content-Type': 'application/json'
      },
      json={
          'is_smart_optimization_active': True
      }
  )
  ```
</CodeGroup>

<Card title="Solar Inverter Attributes Reference" icon="book" href="/partner-api/reference/inverters/attributes">
  Full list of writable inverter fields
</Card>

## Next Steps

<CardGroup cols={2}>
  <Card title="Dashboard Integration" icon="chart-line" href="/partner-api/user-journeys/end-user/dashboard-integration">
    Display device status and consumption data
  </Card>

  <Card title="Device Onboarding" icon="plug" href="/partner-api/user-journeys/end-user/device-onboarding">
    Connect and set up new devices
  </Card>
</CardGroup>
