Skip to content

Commit

Permalink
Use SourceType enum
Browse files Browse the repository at this point in the history
  • Loading branch information
iMicknl committed Jan 7, 2024
1 parent 29d6c5a commit 6f1fa87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/sagemcom_fast/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Any, Dict, Optional

import async_timeout
from homeassistant.components.device_tracker import SOURCE_TYPE_ROUTER
from homeassistant.components.device_tracker import SourceType
from homeassistant.components.device_tracker.config_entry import ScannerEntity
from homeassistant.core import HomeAssistant
from homeassistant.helpers.restore_state import RestoreEntity
Expand Down Expand Up @@ -107,7 +107,7 @@ def unique_id(self) -> str:
@property
def source_type(self) -> str:
"""Return the source type, eg gps or router, of the device."""
return SOURCE_TYPE_ROUTER
return SourceType.ROUTER

@property
def is_connected(self) -> bool:
Expand Down

0 comments on commit 6f1fa87

Please sign in to comment.