EntityStateService

class zvt.contract.base_service.EntityStateService(entity_ids)

Bases: StatefulService

StatefulService which saving one state one entity

__init__(entity_ids) None
states: dict

entity_id:state

clear_state_data(entity_id=None)

clear state of the entity

Parameters:

entity_id – entity id

decode_state(state: str)

decode state

Parameters:

state

Returns:

encode_state(state: object)

encode state

Parameters:

state

Returns:

name = None

name of the service, default name of class if not set manually

state_schema: Type[StateMixin] = None

state schema