pyscript icon indicating copy to clipboard operation
pyscript copied to clipboard

State.set input_boolean

Open d02023287 opened this issue 2 years ago • 2 comments

I am trying to create entities inside home assistant

I am utilizing the following def create_entity(entity_type,name,new_attributes,value=None): state.set(f"{entity_type}.{name}", value, new_attributes)

It does indeed create the entity but when I try and press the switch to change it's state, it just reverts back to off. When I try to use the developer tools to run Input boolean: Turn on I get the error Unable to find referenced entities input_boolean.<<Name of the boolean>>

d02023287 avatar May 24 '22 14:05 d02023287

I think you need to use state.persist to create a new entity

j-steve avatar Jul 18 '23 17:07 j-steve

@d02023287 could you please update or close the issue? Thank you

ALERTua avatar Sep 22 '23 09:09 ALERTua