Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Constants for the EnergyFlip integration."""
2 
3 from energyflip.const import (
4  SOURCE_TYPE_ELECTRICITY,
5  SOURCE_TYPE_ELECTRICITY_IN,
6  SOURCE_TYPE_ELECTRICITY_IN_LOW,
7  SOURCE_TYPE_ELECTRICITY_OUT,
8  SOURCE_TYPE_ELECTRICITY_OUT_LOW,
9  SOURCE_TYPE_GAS,
10 )
11 
12 DATA_COORDINATOR = "coordinator"
13 
14 DOMAIN = "huisbaasje"
15 
16 """Interval in seconds between polls to EnergyFlip."""
17 POLLING_INTERVAL = 20
18 
19 """Timeout for fetching sensor data"""
20 FETCH_TIMEOUT = 10
21 
22 SENSOR_TYPE_RATE = "rate"
23 SENSOR_TYPE_THIS_DAY = "thisDay"
24 SENSOR_TYPE_THIS_WEEK = "thisWeek"
25 SENSOR_TYPE_THIS_MONTH = "thisMonth"
26 SENSOR_TYPE_THIS_YEAR = "thisYear"
27 
28 SOURCE_TYPES = [
29  SOURCE_TYPE_ELECTRICITY,
30  SOURCE_TYPE_ELECTRICITY_IN,
31  SOURCE_TYPE_ELECTRICITY_IN_LOW,
32  SOURCE_TYPE_ELECTRICITY_OUT,
33  SOURCE_TYPE_ELECTRICITY_OUT_LOW,
34  SOURCE_TYPE_GAS,
35 ]