File: renewable_descriptor.py

package info (click to toggle)
python-amberelectric 2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 608 kB
  • sloc: sh: 35; python: 18; makefile: 5
file content (44 lines) | stat: -rw-r--r-- 1,273 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# coding: utf-8

"""
    Amber Electric Public API

    Amber is an Australian-based electricity retailer that pass through the real-time wholesale price of energy.  Because of Amber's wholesale power prices, you can save hundreds of dollars a year by automating high power devices like air-conditioners, heat pumps and pool pumps.  This Python library provides an interface to the API, allowing you to react to current and forecast prices, as well as download your historic usage.

    The version of the OpenAPI document: 2.0.0
    Contact: dev@amber.com.au
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import json
import pprint
import re  # noqa: F401
from aenum import Enum, no_arg





class RenewableDescriptor(str, Enum):
    """
    Describes the state of renewables. Gives you an indication of how green power is right now
    """

    """
    allowed enum values
    """
    BEST = 'best'
    GREAT = 'great'
    OK = 'ok'
    NOTGREAT = 'notGreat'
    WORST = 'worst'

    @classmethod
    def from_json(cls, json_str: str) -> RenewableDescriptor:
        """Create an instance of RenewableDescriptor from a JSON string"""
        return RenewableDescriptor(json.loads(json_str))