Skip to content

Commit

Permalink
Fix uncaught exception when path_vars is not provided in action API
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Hendrix committed Nov 26, 2024
1 parent 3367ee5 commit 73bbf89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/tesla_custom/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

import logging

import voluptuous as vol
from homeassistant.const import ATTR_COMMAND, CONF_EMAIL, CONF_SCAN_INTERVAL
from homeassistant.core import callback
from homeassistant.helpers import config_validation as cv
from teslajsonpy import Controller
import voluptuous as vol

from .const import (
ATTR_PARAMETERS,
Expand Down Expand Up @@ -112,7 +112,7 @@ async def api(call):
command,
parameters,
)
path_vars = parameters.pop(ATTR_PATH_VARS)
path_vars = parameters.pop(ATTR_PATH_VARS, {})
response = await controller.api(name=command, path_vars=path_vars, **parameters)
return response

Expand Down

0 comments on commit 73bbf89

Please sign in to comment.