Bump aiotractive to 1.0.2 (#167783)

This commit is contained in:
Maciej Bieniek
2026-04-09 14:19:46 +02:00
committed by Franck Nijhof
parent 500f030eaa
commit bd904caea1
4 changed files with 24 additions and 3 deletions

View File

@@ -7,5 +7,5 @@
"integration_type": "device",
"iot_class": "cloud_push",
"loggers": ["aiotractive"],
"requirements": ["aiotractive==1.0.1"]
"requirements": ["aiotractive==1.0.2"]
}

2
requirements_all.txt generated
View File

@@ -425,7 +425,7 @@ aiotankerkoenig==0.5.1
aiotedee==0.3.0
# homeassistant.components.tractive
aiotractive==1.0.1
aiotractive==1.0.2
# homeassistant.components.unifi
aiounifi==88

View File

@@ -410,7 +410,7 @@ aiotankerkoenig==0.5.1
aiotedee==0.3.0
# homeassistant.components.tractive
aiotractive==1.0.1
aiotractive==1.0.2
# homeassistant.components.unifi
aiounifi==88

View File

@@ -87,3 +87,24 @@ async def test_source_type_gps(
hass.states.get("device_tracker.test_pet_tracker").attributes["source_type"]
is SourceType.GPS
)
async def test_device_tracker_with_empty_hw_info(
hass: HomeAssistant,
mock_tractive_client: AsyncMock,
mock_config_entry: MockConfigEntry,
) -> None:
"""Test that the device tracker sets up correctly when hw_info is empty."""
mock_tractive_client.tracker.return_value.hw_info = AsyncMock(return_value={})
with patch(
"homeassistant.components.tractive.PLATFORMS", [Platform.DEVICE_TRACKER]
):
await init_integration(hass, mock_config_entry)
mock_tractive_client.send_position_event(mock_config_entry)
await hass.async_block_till_done()
state = hass.states.get("device_tracker.test_pet_tracker")
assert state is not None
assert state.attributes.get("battery_level") is None