Zigbee sensor is always "off"

Hi,
I just added my first Zigbee sensors uzing zha/permit. They showed up immediately but opening or closing the doors doesnt change anything. The magnets are about 1-2 mm from the sensor and the marks are aligned as shown in the installation guide. Im using these sensors: https://www.aliexpress.com/item/New-Updated-Xiaomi-Aqara-Door-Window-Sensor-Zigbee-Wireless-Connection-Smart-Mini-door-sensor-Work-With/32816037464.html?spm=a2g0s.9042311.0.0.pWwoV7

Any ideas as to why they don’t change state when doors open/close please?

Edit: They show up as “Switch” and not as a sensor in Hassio, is that the problem?

Edit 2: I tried adding one sensor explicitly but Hassio says the config is invalid. It worked before adding the sensor manually:

zwave:
  usb_path: /dev/ttyUSB0

zha:
  usb_path: /dev/ttyUSB1
  database_path: /config/zigbee.db

sensor:
  - platform: zigbee
    name: My Analog ZigBee Input
    type: analog
    address: 00158d0001a3de33