-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide an example to import data from CSV #7
Comments
After revewing the code I noted that the function "async_update_historical" is some what important to relaying the data to HA in the file "sensor.py" but suspect that the real work is undertaken in file "api.py". Based off the only function in that file "fetch" it appears to generate random data as what I can see generating in HA @ldotlopez any chance you can provide a dummy example of the way you want the CSV data loaded into the sensor? |
Interested as well ! |
Hi, Historical sensors doesn't support importing from CSV (but it's feature I want to add). @beanonymous, you are right, api.py just generates random (but stable) data, it simulates an external data provider. The simplified schema is:
In order to import CSV data we need to define "how":
However, CSV data format should be very simple: Value needs to be parsed to native type in some second phase. |
Issue #3 talks about having an UI for importing CSV. Maybe a step forward would be to have some example code for people at ease with python to start manipulating / inserting data using this custom_component ? (am trying to figure out how ideenergy is using this module)
The text was updated successfully, but these errors were encountered: