I want to write a script that read every x minutes the value of the device. For example the illuminance or temperature. I have aqara motion sensor, which mesure also the illuminance, but it does not update hassio every x seconds. It sends the date to hassio only when it detected the movement.
This is the counterpart of the set command. It allows you to read a value from a device. To read e.g. the state of a device send the payload {"state": ""}. What you can /get is specified on the device page under the “Exposes” section.
Measured illuminance in lux. Value can be found in the published state on the illuminance property. It’s not possible to read (/get) or write (/set) this value. The unit of this value is lx.
Whatever you get from polling, it will not be the current value, but the last update.
Doesn’t matter, as @m0wlheld wrote you will not be able to get the current value from the sensor. Apart from that illuminance from the this montion sensor is pretty useless, beter take a look at the xiaomi light sensor.