What is the source integration of the sensor? You can only modify the states and attributes of user-defined sensors entities from a limited number of integrations such as Template and MQTT.
It is my own declaration/definition of sensor value. I could define whole variable or variable with attributes. But I absolutely did not find way how to store dictionary to that… I mean at action of an automation. I did not see there any way who to change the values.