Home Assistant Unofficial Reference 2024.12.1
signal_type.py
Go to the documentation of this file.
1 """Define SignalTypes for dispatcher."""
2 
3 from __future__ import annotations
4 
5 
6 class _SignalTypeBase[*_Ts](str):
7  """Generic base class for SignalType."""
8 
9  __slots__ = ()
10 
11 
12 class SignalType[*_Ts](_SignalTypeBase[*_Ts]):
13  """Generic string class for signal to improve typing."""
14 
15  __slots__ = ()
16 
17 
18 class SignalTypeFormat[*_Ts](_SignalTypeBase[*_Ts]):
19  """Generic string class for signal. Requires call to 'format' before use."""
20 
21  __slots__ = ()