Changes in Zigbee2MQTT 1.18.3 and HomeAssistant 2021.05.04 mean that the state value can be blank on trigger. As we trigger from the attribute action anyway, use that as the command value.
A collection of Home Assistant blueprints