mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix path to tesla fleet key file in config folder (#130124)
* Tesla Fleet load key file from config folder * Fix test --------- Co-authored-by: G Johansson <goran.johansson@shiftit.se>
This commit is contained in:
parent
31a2bb1b98
commit
ecd8dde347
@ -134,7 +134,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: TeslaFleetConfigEntry) -
|
||||
signing = product["command_signing"] == "required"
|
||||
if signing:
|
||||
if not tesla.private_key:
|
||||
await tesla.get_private_key("config/tesla_fleet.key")
|
||||
await tesla.get_private_key(hass.config.path("tesla_fleet.key"))
|
||||
api = VehicleSigned(tesla.vehicle, vin)
|
||||
else:
|
||||
api = VehicleSpecific(tesla.vehicle, vin)
|
||||
|
@ -77,9 +77,13 @@ async def test_press_signing_error(
|
||||
new_product["response"][0]["command_signing"] = "required"
|
||||
mock_products.return_value = new_product
|
||||
|
||||
await setup_platform(hass, normal_config_entry, [Platform.BUTTON])
|
||||
with (
|
||||
patch("homeassistant.components.tesla_fleet.TeslaFleetApi.get_private_key"),
|
||||
):
|
||||
await setup_platform(hass, normal_config_entry, [Platform.BUTTON])
|
||||
|
||||
with (
|
||||
patch("homeassistant.components.tesla_fleet.TeslaFleetApi.get_private_key"),
|
||||
patch(
|
||||
"homeassistant.components.tesla_fleet.VehicleSigned.flash_lights",
|
||||
side_effect=NotOnWhitelistFault,
|
||||
|
Loading…
x
Reference in New Issue
Block a user