File: model.py

package info (click to toggle)
python-tilt-pi 0.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 192 kB
  • sloc: python: 153; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 460 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""Models for Tilt Pi."""

from dataclasses import dataclass
from enum import StrEnum


class TiltColor(StrEnum):
    """Tilt color options."""

    BLUE = "Blue"
    BLACK = "Black"
    RED = "Red"
    GREEN = "Green"
    ORANGE = "Orange"
    YELLOW = "Yellow"
    PURPLE = "Purple"
    PINK = "Pink"


@dataclass
class TiltHydrometerData:
    """Data for a Tilt Hydrometer."""

    mac_id: str
    color: TiltColor
    temperature: float
    gravity: float