fixed create_entity warnings

This commit is contained in:
Pierre committed 2026-10-04 22:08:43 +02:00
1 parent caf9051864
commit d8756928a5
1 file changed
+2 -2
+2 -2
View File
@@ -114,10 +114,10 @@ class SmartObject(hass.Hass,LoggerInterface):
if state_class is not None: attributes['state_class'] = state_class
if state is not None:
entity.set_state(state=state, attributes=attributes)
entity.set_state(state=state, attributes=attributes, check_existence=False)
else:
if not entity.exists():
entity.set_state(state='unknown')
entity.set_state(state='unknown', check_existence=False)
entity.set_state(attributes=attributes)
return entity