Add network configuration integration (#50874)
Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com> Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
16e90f12ca
commit
64661ee2b7
19 changed files with 955 additions and 106 deletions
31
homeassistant/components/network/models.py
Normal file
31
homeassistant/components/network/models.py
Normal file
|
@ -0,0 +1,31 @@
|
|||
"""Models helper class for the network integration."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TypedDict
|
||||
|
||||
|
||||
class IPv6ConfiguredAddress(TypedDict):
|
||||
"""Represent an IPv6 address."""
|
||||
|
||||
address: str
|
||||
flowinfo: int
|
||||
scope_id: int
|
||||
network_prefix: int
|
||||
|
||||
|
||||
class IPv4ConfiguredAddress(TypedDict):
|
||||
"""Represent an IPv4 address."""
|
||||
|
||||
address: str
|
||||
network_prefix: int
|
||||
|
||||
|
||||
class Adapter(TypedDict):
|
||||
"""Configured network adapters."""
|
||||
|
||||
name: str
|
||||
enabled: bool
|
||||
auto: bool
|
||||
default: bool
|
||||
ipv6: list[IPv6ConfiguredAddress]
|
||||
ipv4: list[IPv4ConfiguredAddress]
|
Loading…
Add table
Add a link
Reference in a new issue