mirror of
https://github.com/home-assistant/core.git
synced 2026-04-19 16:09:06 +02:00
Bump aiotractive to 1.0.2 (#167783)
This commit is contained in:
committed by
Franck Nijhof
parent
500f030eaa
commit
bd904caea1
@@ -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
2
requirements_all.txt
generated
@@ -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
|
||||
|
||||
2
requirements_test_all.txt
generated
2
requirements_test_all.txt
generated
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user