mirror of
https://github.com/home-assistant/core
synced 2024-09-03 08:14:07 +02:00
![Michael](/assets/img/avatar_default.png)
* add strict type annotations * apply suggestions * rename to TCP_PLATFORM_SCHEMA * Replace DiscoveryInfoType
23 lines
457 B
Python
23 lines
457 B
Python
"""Models for TCP platform."""
|
|
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
|