ESP !include question

Got a question:
ESPhome document explains the following which does work ok.

sensor:
  - <<: !include common/sensor/uptime.config.yaml
  - <<: !include common/sensor/wifi_signal.config.yaml
binary_sensor:
  - <<: !include common/binary_sensor/connection_status.config.yaml

switch:
  - !include common/switch/restart_switch.config.yaml

but how the hell could I !include a separated yaml into a text_sensor? TIA.

Not sure wherr you got that, but I think this is the syntax

switch:
  - !include common/switch/restart.yaml

It’s from here:

Was new to me too.