Skip to content
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

reading ID can be a string (at least on cosm.com) #27

Open
petrklus opened this issue Apr 4, 2013 · 1 comment
Open

reading ID can be a string (at least on cosm.com) #27

petrklus opened this issue Apr 4, 2013 · 1 comment

Comments

@petrklus
Copy link

petrklus commented Apr 4, 2013

Hi,
First of all - thank for your excellent library!

I am using it to publish some temperatures from my home automation system, however, I had to resort to a rather dirty hack to enable string in identifiers:

pac = eeml.datastream.Cosm(API_URL, API_KEY)

fridge_temp = eeml.Data(0, 4.2, unit=eeml.unit.Celsius())
fridge_temp._id = "fridge_temp" #overriding the check for integer

freezer_temp = eeml.Data(0, -22.2, unit=eeml.unit.Celsius())
freezer_temp._id = "freezer_temp"
pac.update([fridge_temp])
pac.update([freezer_temp])
pac.put()

As I like things robust, I would prefer it it all worked even after you update and change some of the internals...

Here is an example of my aforementioned setup, where all works as it should!
image

@petervizi
Copy link
Owner

Hey petrklus, please refer to issue #24 for a detailed discussion, and the test_invalidator test case in tests/test_eeml.py on how to use the Invalidator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants