Beispiel #1
0
 async def async_step_discovery(
         self, discovery_info: DiscoveryInfoType) -> FlowResult:
     """Handle discovery."""
     self._discovered_device = Device30303(
         ipaddress=discovery_info["ipaddress"],
         name=discovery_info["name"],
         mac=discovery_info["mac"],
         hostname=discovery_info["hostname"],
     )
     return await self._async_handle_discovery()
Beispiel #2
0
 async def async_step_dhcp(
         self, discovery_info: dhcp.DhcpServiceInfo) -> FlowResult:
     """Handle discovery via dhcp."""
     self._discovered_device = Device30303(
         ipaddress=discovery_info.ip,
         name="",
         mac=normalize_mac(discovery_info.macaddress),
         hostname=discovery_info.hostname,
     )
     return await self._async_handle_discovery()
Beispiel #3
0
MOCK_ASYNC_GET_STATUS_INACTIVE = SteamistStatus(
    temp=70, temp_units="F", minutes_remain=0, active=False
)
MOCK_ASYNC_GET_STATUS_ACTIVE = SteamistStatus(
    temp=102, temp_units="F", minutes_remain=14, active=True
)
DEVICE_IP_ADDRESS = "127.0.0.1"
DEVICE_NAME = "Master Bath"
DEVICE_MAC_ADDRESS = "AA:BB:CC:DD:EE:FF"
DEVICE_HOSTNAME = "MY450-EEFF"
FORMATTED_MAC_ADDRESS = dr.format_mac(DEVICE_MAC_ADDRESS)
DEVICE_MODEL = "MY450"
DEVICE_30303 = Device30303(
    ipaddress=DEVICE_IP_ADDRESS,
    name=DEVICE_NAME,
    mac=DEVICE_MAC_ADDRESS,
    hostname=DEVICE_HOSTNAME,
)
DEVICE_30303_NOT_STEAMIST = Device30303(
    ipaddress=DEVICE_IP_ADDRESS,
    name=DEVICE_NAME,
    mac=DEVICE_MAC_ADDRESS,
    hostname="not_steamist",
)
DISCOVERY_30303 = {
    "ipaddress": DEVICE_IP_ADDRESS,
    "name": DEVICE_NAME,
    "mac": DEVICE_MAC_ADDRESS,
    "hostname": DEVICE_HOSTNAME,
}
DISCOVERY_30303_NOT_STEAMIST = {