Skip to content

Commit

Permalink
Merge pull request #24 from tdragon/2023.9
Browse files Browse the repository at this point in the history
2023.9
  • Loading branch information
tdragon authored Sep 15, 2023
2 parents 1d1495a + 21279ca commit d6a7242
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
python-version: ["3.11"]

steps:
- uses: actions/checkout@v2
Expand Down
25 changes: 11 additions & 14 deletions custom_components/reef_pi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from homeassistant.exceptions import ConfigEntryAuthFailed
from homeassistant.helpers.entity import DeviceInfo

from async_timeout import timeout
from datetime import timedelta
Expand Down Expand Up @@ -134,22 +135,18 @@ def __init__(self, hass, session, config_entry):
)

@property
def device_info(self):
info = {
'identifiers': {
def device_info(self) -> DeviceInfo:

return DeviceInfo(
configuration_url = self.configuration_url,
identifiers={
(DOMAIN, self.unique_id)
},
'default_name': self.default_name,
'default_manufacturer': MANUFACTURER,
"default_model" : "Reef PI",
"configuration_url": self.configuration_url
}
if self.info:
info['model'] = self.info["model"]
info['sw_version'] = self.info["version"]
info['name'] = self.info["name"]
info['default_name'] = self.info["name"]
return info
manufacturer = MANUFACTURER,
model = self.info["model"] if self.info["model"] else "Reef PI",
name = self.info["name"] if self.info["name"] else self.default_name,
sw_version = self.info["name"] if self.info["name"] else None,
)

async def update_capabilities(self):
_LOGGER.debug("Fetching capabilities")
Expand Down
7 changes: 4 additions & 3 deletions custom_components/reef_pi/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"domain": "reef_pi",
"version": "0.3.6",
"version": "0.3.7",
"name": "Reef PI Integration",
"config_flow": true,
"documentation": "https://github.com/tdragon/reef-pi-hass-custom",
Expand All @@ -13,7 +13,8 @@
],
"dependencies": [],
"codeowners": [
"@tdragon", "@alex255"
"@tdragon",
"@alex255"
],
"iot_class": "local_polling"
}
}
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pytest]
asyncio_mode = auto
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
httpx>=0.21.0
pytest>=6.2.5
pytest-homeassistant-custom-component==0.12.21
pytest-homeassistant-custom-component==0.13.56
pytest-asyncio>=0.19

0 comments on commit d6a7242

Please sign in to comment.