@@ -48,7 +48,7 @@ def is_kitchen_light(entity_id: str) -> bool:
4848from logging import getLogger
4949from typing import Any , Generic , TypeVar
5050
51- from hassette .const import MISSING_VALUE , NOT_PROVIDED
51+ from hassette .const import ANY_VALUE , MISSING_VALUE
5252from hassette .events import CallServiceEvent
5353from hassette .events .base import EventT
5454from hassette .models .states import StateT
@@ -142,14 +142,14 @@ class ValueIs(Generic[EventT, V]):
142142
143143 Args:
144144 source: Callable that extracts the value to compare from the event.
145- condition: A literal or callable tested against the extracted value. If NOT_PROVIDED , always True.
145+ condition: A literal or callable tested against the extracted value. If ANY_VALUE , always True.
146146 """
147147
148148 source : Callable [[EventT ], V ]
149- condition : ChangeType = NOT_PROVIDED
149+ condition : ChangeType = ANY_VALUE
150150
151151 def __call__ (self , event : EventT ) -> bool :
152- if self .condition is NOT_PROVIDED :
152+ if self .condition is ANY_VALUE :
153153 return True
154154 value = self .source (event )
155155 return compare_value (value , self .condition )
@@ -366,9 +366,10 @@ def __post_init__(self) -> None:
366366
367367 for k , cond in self .spec .items ():
368368 source = get_service_data_key (k )
369+ c : ChangeType
369370 # presence check
370- if cond is NOT_PROVIDED :
371- c : ChangeType = Present ()
371+ if cond is ANY_VALUE :
372+ c = Present ()
372373 # auto-glob wrapping
373374 elif self .auto_glob and isinstance (cond , str ) and is_glob (cond ):
374375 c = Glob (cond )
0 commit comments