Script available to download air purifier fan settings?

I have multiple air purifiers connected to my Home Assistant (Rabbit Air Minus2 and Levoit Vital 200s). I'm able to view and control their fan settings, but I can't find a way to easily download fan setting history (low/medium/high) as a csv file.

I wonder if there is a way to write a script of sorts that intervenes on a specific timeline (like every hour) to go capture what the fan status is. Does anyone have any suggestions?

Configure the File integration to be able to use the notify.send_message action to write data to an external file.

Then create an automation employing a Time Pattern Trigger set for every hour. Have it get the fan's current status and write it to the external file (with notify.send_message).

You can also go to your history page and download the state data as a CSV there.

You could also query your SQL DB directly and export a CSV that way.

If the state didn't change for more than an hour (if you want hourly data points), you'd need to fill the series using a script of sorts.

Both depend on your recorder retention settings, of course.

What are you looking to do?