summaryrefslogtreecommitdiff
path: root/include/py/homekit/temphum/base.py
blob: c9d5111e0f516e98c68862d29b8d76cc5082d046 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from abc import ABC
from enum import Enum


class BaseSensor(ABC):
    def __init__(self, bus: int):
        super().__init__()
        self.bus = smbus.SMBus(bus)

    def humidity(self) -> float:
        pass

    def temperature(self) -> float:
        pass


class SensorType(Enum):
    Si7021 = 'si7021'
    DHT12 = 'dht12'