Skip to content

Commit

Permalink
Fix type of Addon.ip_address (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdegat01 authored Oct 3, 2024
1 parent 00c4938 commit f895eba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion aiohasupervisor/models/addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from abc import ABC
from dataclasses import dataclass, field
from enum import StrEnum
from ipaddress import IPv4Address
from typing import Any

from mashumaro import field_options
Expand Down Expand Up @@ -242,7 +243,7 @@ class InstalledAddonComplete(
audio_input: str | None
audio_output: str | None
auto_update: bool
ip_address: bool
ip_address: IPv4Address
watchdog: bool
devices: list[str]

Expand Down
4 changes: 3 additions & 1 deletion tests/test_addons.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Test addons supervisor client."""

from ipaddress import IPv4Address

from aioresponses import aioresponses
from yarl import URL

Expand Down Expand Up @@ -55,7 +57,7 @@ async def test_addons_info(
assert addon.changelog is True
assert addon.watchdog is False
assert addon.auto_update is False
assert addon.ip_address == "172.30.33.0"
assert addon.ip_address == IPv4Address("172.30.33.0")
assert Capability.NET_RAW in addon.privileged
assert "not_real" in addon.privileged
assert addon.supervisor_api is True
Expand Down

0 comments on commit f895eba

Please sign in to comment.