Please help me with editing entities in my integration

I wrote an integration for communication with PLCs like Merbo, Mervis, Domat for SSCP protocol. Everything works but when I want to edit already created entities it works but after restart the original home assistant state is loaded and I don’t understand why at all.

I use :
self.hass.config_entries.async_update_entry(
self.config_entry, data={**self.config_entry.data, “variables”: variables}
)

Possible source codes are :
https://github.com/cervenyxp/hass_sscp_integration/

Please advice or help