How could i export the data of sensor in CSV-file

hello all
I install home assist and connet Aeotec Multisensor 5 und USB to it.
I try to use File sensor " https://home-assistant.io/components/sensor.file/ "for geting the values of multisensor 5 in sensor-data.txt or json or csv.
All what i configure is the following configuration.
sensor:

  • platform: file
    file_path: /home/homeassistant/.homeassistant/sensor-data.txt
    name: Temperature
    value_template: ‘{{ value_json.temperature }}’
    unit_of_measurement: ‘°C’

i found nothing at the path for geting the sensor-data.txt. what should i change else?
My second question is:
why my multisensor5 always in sleeping mode?
How can i configure it that it should send a signal every 10 min?
could someone give me a clue please?

The Multi Sensor is mostly asleep because it’s a battery powered device. This is by design. If you want it to stay awake you’ll need to power it from USB. You could change the configuration to send an update every 10 minutes, but it’ll shorten the battery life significantly.

The file sensor is for reading from a file, not writing to one. You could use a file notifier, to log data to a file (use an automation to trigger when the state of the entity changes). You can use a template to control the way that is recorded.

1 Like

Thank you for the quick answer.
I changed the power mode from batteries to mini Usb cable. it has changed from sleeping_load_cache_mode to Sleeping_mode. Should i change some configuration in config.yaml to get it ready?
Log:
**** changed to Sleeping
16:11
Sensor turned on
16:11
changed to Dynamic
16:11
changed to Static
16:11
changed to ManufacturerSpecific2
16:11
changed to NodePlusInfo
16:11
changed to WakeUp
16:11
Aeotec ZW090 Z-Stick Gen5 EU changed to Ready


You need to exclude (Remove) it then re-include (Add) it if you change the power source, as it explains in the manual :wink:

2 Likes