since some years I’ve used a time based automation to write a sensor value to a file. Since notify has change and since the latest update this automation does not work anymore.
I was not able to find a new solution to make it working again. I’m using the exported data to display it on my mobile phone (using a http call).
The automation "Sensor value to file" (automation.sensor_value_to_file) is not active because the configuration has errors.
Error:extra keys not allowed @ data['data']. Got {'message': '{{now().strftime("%d.%m.%Y;%H:%M:%S")}};{{ states.sensor.wohnzimmer.state | round(1) }}; {{ states.sensor.wohnzimmer_2.state | round(1) }}; {{ states.sensor.aussensensor.state | round(1)}}; {{ states.sensor.aussensensor_2.state | round(1) }}'} extra keys not allowed @ data['target']. Got {'entity_id': 'notify.writefile1'}.
To fix this error, edit the automation to correct it, then save and reload the automation configuration.
Test done for the sensors without any error. As these are in place since a long time, I don’t expect to have an issue here. It’s more the new notify functionality and the sheduling which behave different since the last update.
Unfortunately the error message of the automation is not precise enough (for me) to identify the root cause.
The error message is precise.
It tells you that data is not a valid key, which it isn’t at that position.
As stated before you have indentation errors, and that is what the error message says also.
After some more checks even with the new notify action, the error did not disappear. Even a simple “Hello world” message does not show up in my file. The error does not come from my states entities. Even with the new format and good indentations it was not working.
But I found a better solution to transfer the entity values to my mobile phone (this was the basic purpose of this logfile): I’ve switched to Tasker and I’m now using an api call to fetch the entity states.