# Path: braubuddy/envcontroller/base.py
# class IEnvController(object):
#     """
#     Interface for creating an environmental controller for use with
#     :mod:`braubuddy`.
#     """
#     __metaclass__ = abc.ABCMeta
# 
#     def __init__(self):
#         pass
# 
#     @abc.abstractmethod
#     def set_heater_level(percent):
#         """
#         Set environmental controller's heater power level as a percentage of
#         full power.
# 
#         :param percent: Heater power level.
#         :type _percent: :class:`int` in range(0-100)
#         :raises: PercentageError if percent is invalid
#         """
# 
#     @abc.abstractmethod
#     def set_cooler_level(percent):
#         """
#         Set environmental controller's cooler power level as a percentage of
#         full power.
# 
#         :param percent: Cooler power level.
#         :type _percent: :class:`int` in range(0-100)
#         :raises: PercentageError if percent is invalid
#         """
# 
#     @abc.abstractmethod
#     def get_power_levels(self):
#         """
#         Get heater and cooler power levels.
# 
#         :returns: Heater and cooler power levels
#         :rtype: :class:`tuple` of (:class:`int` <heater_power_level>,
#             :class:`int` <cooler_power_level>)
#         """
# 
# Path: braubuddy/envcontroller/base.py
# class PercentageError(Exception):
#     """
#     Raised when a percentage is passed not in the range 0-100
#     """


from braubuddy.envcontroller import IEnvController
from braubuddy.envcontroller import PercentageError


class DummyEnvController(IEnvController):
    """
    A dummy EnvController. Use for testing.
    """

    def __init__(self):

        self._heater_percent = 0
        self._cooler_percent = 0

    def set_heater_level(self, percent):

        if percent not in range(0, 101):
            msg = '{0} is not in range 0-100'.format(percent)

# Path: braubuddy/envcontroller/base.py
# class IEnvController(object):
#     """
#     Interface for creating an environmental controller for use with
#     :mod:`braubuddy`.
#     """
#     __metaclass__ = abc.ABCMeta
# 
#     def __init__(self):
#         pass
# 
#     @abc.abstractmethod
#     def set_heater_level(percent):
#         """
#         Set environmental controller's heater power level as a percentage of
#         full power.
# 
#         :param percent: Heater power level.
#         :type _percent: :class:`int` in range(0-100)
#         :raises: PercentageError if percent is invalid
#         """
# 
#     @abc.abstractmethod
#     def set_cooler_level(percent):
#         """
#         Set environmental controller's cooler power level as a percentage of
#         full power.
# 
#         :param percent: Cooler power level.
#         :type _percent: :class:`int` in range(0-100)
#         :raises: PercentageError if percent is invalid
#         """
# 
#     @abc.abstractmethod
#     def get_power_levels(self):
#         """
#         Get heater and cooler power levels.
# 
#         :returns: Heater and cooler power levels
#         :rtype: :class:`tuple` of (:class:`int` <heater_power_level>,
#             :class:`int` <cooler_power_level>)
#         """
# 
# Path: braubuddy/envcontroller/base.py
# class PercentageError(Exception):
#     """
#     Raised when a percentage is passed not in the range 0-100
#     """


# Path: braubuddy/envcontroller/dummy.py
from braubuddy.envcontroller import IEnvController
from braubuddy.envcontroller import PercentageError



class DummyEnvController(IEnvController):
    """
    A dummy EnvController. Use for testing.
    """

    def __init__(self):

        self._heater_percent = 0
        self._cooler_percent = 0

    def set_heater_level(self, percent):

        if percent not in range(0, 101):
            msg = '{0} is not in range 0-100'.format(percent)

            raise PercentageError(msg)