2021-05-22 14:45:18 +00:00
|
|
|
"""Models for TCP platform."""
|
2024-03-08 15:35:23 +00:00
|
|
|
|
2021-05-22 14:45:18 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from typing import TypedDict
|
|
|
|
|
|
|
|
from homeassistant.helpers.template import Template
|
|
|
|
|
|
|
|
|
|
|
|
class TcpSensorConfig(TypedDict):
|
|
|
|
"""TypedDict for TcpSensor config."""
|
|
|
|
|
|
|
|
name: str
|
|
|
|
host: str
|
|
|
|
port: str
|
|
|
|
timeout: int
|
|
|
|
payload: str
|
|
|
|
unit_of_measurement: str | None
|
|
|
|
value_template: Template | None
|
|
|
|
value_on: str | None
|
|
|
|
buffer_size: int
|
|
|
|
ssl: bool
|
|
|
|
verify_ssl: bool
|