1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-02 08:26:41 +01:00

Mark is_on property as mandatory in binary sensors and toggle entities (#163556)

This commit is contained in:
epenet
2026-02-19 17:01:50 +01:00
committed by GitHub
parent c144aec03e
commit 0188f2ffec

View File

@@ -798,6 +798,7 @@ _TOGGLE_ENTITY_MATCH: list[TypeHintMatch] = [
TypeHintMatch(
function_name="is_on",
return_type=["bool", None],
mandatory=True,
),
TypeHintMatch(
function_name="turn_on",
@@ -939,6 +940,7 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
TypeHintMatch(
function_name="is_on",
return_type=["bool", None],
mandatory=True,
),
],
),