Cover state unavailable

I’ve got QS-Zigbee-C01 which controls my projector screen and it was working fine until some time ago.
Right now the cover entity state is unavailable. The lovelace entity card is not working at all, however when I go to z2m dashboard, the device is there, responding and allows me to control the screen as usual:

I run HA on proxmox, on HP T620. Current version of z2m: 1.18.1-1.

I finally found anything in the logs, but I’m not sure how relevant it is…

Exception in async_discover when dispatching 'mqtt_discovery_new_cover_mqtt': ({'availability': [{'topic': 'zigbee2mqtt/bridge/state'}], 'command_topic': 'zigbee2mqtt/Projector Screen/set', 'device': {'identifiers': ['zigbee2mqtt_0x5c0272fffec3d6de'], 'manufacturer': 'Lonsonho', 'model': 'Curtain/blind motor controller (QS-Zigbee-C01)', 'name': 'Projector Screen', 'sw_version': 'Zigbee2MQTT 1.18.1'}, 'json_attributes_topic': 'zigbee2mqtt/Projector Screen', 'name': 'Projector Screen', 'position_topic': 'zigbee2mqtt/Projector Screen', 'set_position_template': '{ "position": {{ position }} }', 'set_position_topic': 'zigbee2mqtt/Projector Screen/set', 'unique_id': '0x5c0272fffec3d6de_cover_zigbee2mqtt', 'value_template': '{{ value_json.position }}', 'platform': 'mqtt'},) Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__ return self._compiled([], data) File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable return schema(data) File "/usr/src/homeassistant/homeassistant/components/mqtt/cover.py", line 118, in validate_options raise vol.Invalid( voluptuous.error.Invalid: 'value_template' must be set together with 'state_topic'. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 160, in async_discover config = schema(discovery_payload) File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 218, in __call__ return self._exec((Schema(val) for val in self.validators), v) File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 341, in _exec raise e if self.msg is None else AllInvalid(self.msg, path=path) File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 337, in _exec v = func(v) File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 276, in __call__ raise er.MultipleInvalid([e]) voluptuous.error.MultipleInvalid: 'value_template' must be set together with 'state_topic'.

Hard to read, but "value_template’ must be set together with ‘state_topic’ seems relevant

Right, doesn’t look good in a single line of code…

Exception in async_discover when dispatching 'mqtt_discovery_new_cover_mqtt': ({'availability': [{'topic': 'zigbee2mqtt/bridge/state'}], 'command_topic': 'zigbee2mqtt/Projector Screen/set', 'device': {'identifiers': ['zigbee2mqtt_0x5c0272fffec3d6de'], 'manufacturer': 'Lonsonho', 'model': 'Curtain/blind motor controller (QS-Zigbee-C01)', 'name': 'Projector Screen', 'sw_version': 'Zigbee2MQTT 1.18.1'}, 'json_attributes_topic': 'zigbee2mqtt/Projector Screen', 'name': 'Projector Screen', 'position_topic': 'zigbee2mqtt/Projector Screen', 'set_position_template': '{ "position": {{ position }} }', 'set_position_topic': 'zigbee2mqtt/Projector Screen/set', 'unique_id': '0x5c0272fffec3d6de_cover_zigbee2mqtt', 'value_template': '{{ value_json.position }}', 'platform': 'mqtt'},) 
Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__ return self._compiled([], data) 
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable return schema(data) 
File "/usr/src/homeassistant/homeassistant/components/mqtt/cover.py", line 118, in validate_options raise vol.Invalid( voluptuous.error.Invalid: 'value_template' must be set together with 'state_topic'. 
During handling of the above exception, another exception occurred: 
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 160, in async_discover config = schema(discovery_payload) 
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 218, in __call__ return self._exec((Schema(val) for val in self.validators), v) 
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 341, in _exec raise e if self.msg is None else AllInvalid(self.msg, path=path) 
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 337, in _exec v = func(v) 
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 276, in __call__ raise er.MultipleInvalid([e]) voluptuous.error.MultipleInvalid: 'value_template' must be set together with 'state_topic'.

I hope now it’s more user friendly.

"value_template’ must be set together with “state_topic”

How this can break on its own? I mean should I try to upgrade the z2m integration or the HA core (I have it at 2021.6.5) or just remove the device and try to add it again? Any tips appreciated.