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

Update controller.py #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update controller.py #6

wants to merge 1 commit into from

Conversation

lalo-uy
Copy link

@lalo-uy lalo-uy commented Aug 14, 2020

Added Tank name to the plot caption
Added get_temp2, to be able to use second sensor on FermenterController
May be sensor3 have to be added too.

Added Tank name to the plot caption
Added get_temp2, to be able to use second sensor on FermenterController
@@ -166,3 +166,9 @@ def get_temp(self, id=None):
id = self.fermenter_id
return self.get_sensor_value(int(self.api.cache.get("fermenter").get(id).sensor))

@cbpi.try_catch(None)
def get_temp2(self, id=None):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably is better to pass the sensor as a parameter to get_temp method with a default to not break existing code...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for may lack of knowledge of pyhon, but how do you pass a member of fermenter as parameter?
get_temp(self, id=None, sens=sensor):
......get(id).sens )) do not work

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

Successfully merging this pull request may close these issues.

2 participants