How to use the pywemo.ouimeaux_device.humidifier.FanMode function in pywemo

To help you get started, we’ve selected a few pywemo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pavoni / pywemo / pywemo / ouimeaux_device / humidifier.py View on Github external
# and the numbers have meaning.
class FanMode(IntEnum):
    """Enum to map WeMo FanModes to human-readable strings."""

    Off = 0  # Fan and device turned off
    Minimum = 1
    Low = 2
    Medium = 3
    High = 4
    Maximum = 5


FAN_MODE_NAMES = {
    FanMode.Off: "Off",
    FanMode.Minimum: "Minimum",
    FanMode.Low: "Low",
    FanMode.Medium: "Medium",
    FanMode.High: "High",
    FanMode.Maximum: "Maximum"
}


class DesiredHumidity(IntEnum):
    """Enum to map WeMo DesiredHumidity to human-readable strings."""

    FortyFivePercent = 0
    FiftyPercent = 1
    FiftyFivePercent = 2
    SixtyPercent = 3
    OneHundredPercent = 4  # "Always On" Mode
github pavoni / pywemo / pywemo / ouimeaux_device / humidifier.py View on Github external
Off = 0  # Fan and device turned off
    Minimum = 1
    Low = 2
    Medium = 3
    High = 4
    Maximum = 5


FAN_MODE_NAMES = {
    FanMode.Off: "Off",
    FanMode.Minimum: "Minimum",
    FanMode.Low: "Low",
    FanMode.Medium: "Medium",
    FanMode.High: "High",
    FanMode.Maximum: "Maximum"
}


class DesiredHumidity(IntEnum):
    """Enum to map WeMo DesiredHumidity to human-readable strings."""

    FortyFivePercent = 0
    FiftyPercent = 1
    FiftyFivePercent = 2
    SixtyPercent = 3
    OneHundredPercent = 4  # "Always On" Mode


DESIRED_HUMIDITY_NAMES = {
    DesiredHumidity.FortyFivePercent: "45",
    DesiredHumidity.FiftyPercent: "50",
github pavoni / pywemo / pywemo / ouimeaux_device / humidifier.py View on Github external
class FanMode(IntEnum):
    """Enum to map WeMo FanModes to human-readable strings."""

    Off = 0  # Fan and device turned off
    Minimum = 1
    Low = 2
    Medium = 3
    High = 4
    Maximum = 5


FAN_MODE_NAMES = {
    FanMode.Off: "Off",
    FanMode.Minimum: "Minimum",
    FanMode.Low: "Low",
    FanMode.Medium: "Medium",
    FanMode.High: "High",
    FanMode.Maximum: "Maximum"
}


class DesiredHumidity(IntEnum):
    """Enum to map WeMo DesiredHumidity to human-readable strings."""

    FortyFivePercent = 0
    FiftyPercent = 1
    FiftyFivePercent = 2
    SixtyPercent = 3
    OneHundredPercent = 4  # "Always On" Mode


DESIRED_HUMIDITY_NAMES = {
github pavoni / pywemo / pywemo / ouimeaux_device / humidifier.py View on Github external
# Thus these names/values were not chosen randomly
# and the numbers have meaning.
class FanMode(IntEnum):
    """Enum to map WeMo FanModes to human-readable strings."""

    Off = 0  # Fan and device turned off
    Minimum = 1
    Low = 2
    Medium = 3
    High = 4
    Maximum = 5


FAN_MODE_NAMES = {
    FanMode.Off: "Off",
    FanMode.Minimum: "Minimum",
    FanMode.Low: "Low",
    FanMode.Medium: "Medium",
    FanMode.High: "High",
    FanMode.Maximum: "Maximum"
}


class DesiredHumidity(IntEnum):
    """Enum to map WeMo DesiredHumidity to human-readable strings."""

    FortyFivePercent = 0
    FiftyPercent = 1
    FiftyFivePercent = 2
    SixtyPercent = 3
    OneHundredPercent = 4  # "Always On" Mode
github pavoni / pywemo / pywemo / ouimeaux_device / humidifier.py View on Github external
def get_state(self, force_update=False):
        """Return 0 if off and 1 if on."""
        # The base implementation using GetBinaryState
        # doesn't work for Humidifier (always returns 0)
        # so use fan mode instead.
        if force_update or self._state is None:
            self.update_attributes()

        # Consider the Humidifier to be "on" if it's not off.
        return int(self._state != FanMode.Off)
github pavoni / pywemo / pywemo / ouimeaux_device / humidifier.py View on Github external
"""Enum to map WeMo FanModes to human-readable strings."""

    Off = 0  # Fan and device turned off
    Minimum = 1
    Low = 2
    Medium = 3
    High = 4
    Maximum = 5


FAN_MODE_NAMES = {
    FanMode.Off: "Off",
    FanMode.Minimum: "Minimum",
    FanMode.Low: "Low",
    FanMode.Medium: "Medium",
    FanMode.High: "High",
    FanMode.Maximum: "Maximum"
}


class DesiredHumidity(IntEnum):
    """Enum to map WeMo DesiredHumidity to human-readable strings."""

    FortyFivePercent = 0
    FiftyPercent = 1
    FiftyFivePercent = 2
    SixtyPercent = 3
    OneHundredPercent = 4  # "Always On" Mode


DESIRED_HUMIDITY_NAMES = {
    DesiredHumidity.FortyFivePercent: "45",