Projet de remplacement du "RPiPasserelle" d'Otec.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

variable_value.py 460B

123456789101112131415161718
  1. from pyheatpump.db import RowClass
  2. from pyheatpump.db import sql
  3. class VariableType(RowClass):
  4. slabel: str = None
  5. label: str = None
  6. type: str = None
  7. start_address: int = None
  8. end_address: int = None
  9. def __init__(self, **kwargs):
  10. super().__init__(**kwargs)
  11. @staticmethod
  12. def getall():
  13. return dict([
  14. (row['label'], VariableType(**dict(row)))
  15. for row in sql('SELECT * FROM var_type') ])