No persistent file


I’m using mysensors and HA.
I have to use Json persistent file but it doesn’t work.
With the line of persistence_file: ‘mysensors.json’
it doesn’t work.
HA create a mysensor1.pickle…

How can I have the json file?

I’m using windows 10 and last version of HA and python.
Please!!! :frowning:

You should enter the full path to the file. Make sure the directory exists and that hass has write access. See below for an example. Not tested, but should work. Note the forward slashes.

    - device: 'COM4'
      persistence_file: 'c:/example/mysensors.json'
1 Like

i had the same problem in the beginning, maybe it should be put in the documentation?

1 Like

It doesn’t work.
I have tested ‘c:\exemple\mysensors.json’ / ‘c:/exemple/mysensors.json’ / ‘c:\exemple\mysensors.json’ / ‘d:\mysensors.json’

i know, i tried out a few off those in the beginning also.

if i remember correctly there was somthing not exactly like it should be at that moment.

    - device: 'COM4'
      persistence_file: 'C:\Users\rene\AppData\Roaming\.homeassistant\mysensors.json'

it should be exactly like this, (2 spaces more then the device line)
after you saved the config, close HA, delete the old mysensor file and restart HA.

look out that you dont have a backupfile somewhere because he will take that one :wink:

if it does work pleas copy/paste the part of the config.yaml here so we can look at it.

That was the two spaces before…
I hope this post will help in future.
Big thanks men

1 Like

The YAML syntax and format is not specific for the mysensors component or the persistence_file entry. You will learn YAML and get to know it better after a while of using home assistant.

This topic has some observations and suggestions: