mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 13:47:35 +00:00
Bump pizzapi to 0.0.6 (#120691)
This commit is contained in:
parent
08a0eaf184
commit
38a30b343d
@ -4,11 +4,11 @@ from datetime import timedelta
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from pizzapi import Address, Customer, Order
|
from pizzapi import Address, Customer, Order
|
||||||
from pizzapi.address import StoreException
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components import http
|
from homeassistant.components import http
|
||||||
from homeassistant.core import HomeAssistant, ServiceCall, callback
|
from homeassistant.core import HomeAssistant, ServiceCall, callback
|
||||||
|
from homeassistant.exceptions import HomeAssistantError
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.helpers.entity_component import EntityComponent
|
from homeassistant.helpers.entity_component import EntityComponent
|
||||||
@ -118,7 +118,7 @@ class Dominos:
|
|||||||
self.country = conf.get(ATTR_COUNTRY)
|
self.country = conf.get(ATTR_COUNTRY)
|
||||||
try:
|
try:
|
||||||
self.closest_store = self.address.closest_store()
|
self.closest_store = self.address.closest_store()
|
||||||
except StoreException:
|
except Exception: # noqa: BLE001
|
||||||
self.closest_store = None
|
self.closest_store = None
|
||||||
|
|
||||||
def handle_order(self, call: ServiceCall) -> None:
|
def handle_order(self, call: ServiceCall) -> None:
|
||||||
@ -139,7 +139,7 @@ class Dominos:
|
|||||||
"""Update the shared closest store (if open)."""
|
"""Update the shared closest store (if open)."""
|
||||||
try:
|
try:
|
||||||
self.closest_store = self.address.closest_store()
|
self.closest_store = self.address.closest_store()
|
||||||
except StoreException:
|
except Exception: # noqa: BLE001
|
||||||
self.closest_store = None
|
self.closest_store = None
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
@ -219,7 +219,7 @@ class DominosOrder(Entity):
|
|||||||
"""Update the order state and refreshes the store."""
|
"""Update the order state and refreshes the store."""
|
||||||
try:
|
try:
|
||||||
self.dominos.update_closest_store()
|
self.dominos.update_closest_store()
|
||||||
except StoreException:
|
except Exception: # noqa: BLE001
|
||||||
self._orderable = False
|
self._orderable = False
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -227,13 +227,13 @@ class DominosOrder(Entity):
|
|||||||
order = self.order()
|
order = self.order()
|
||||||
order.pay_with()
|
order.pay_with()
|
||||||
self._orderable = True
|
self._orderable = True
|
||||||
except StoreException:
|
except Exception: # noqa: BLE001
|
||||||
self._orderable = False
|
self._orderable = False
|
||||||
|
|
||||||
def order(self):
|
def order(self):
|
||||||
"""Create the order object."""
|
"""Create the order object."""
|
||||||
if self.dominos.closest_store is None:
|
if self.dominos.closest_store is None:
|
||||||
raise StoreException
|
raise HomeAssistantError("No store available")
|
||||||
|
|
||||||
order = Order(
|
order = Order(
|
||||||
self.dominos.closest_store,
|
self.dominos.closest_store,
|
||||||
@ -252,7 +252,7 @@ class DominosOrder(Entity):
|
|||||||
try:
|
try:
|
||||||
order = self.order()
|
order = self.order()
|
||||||
order.place()
|
order.place()
|
||||||
except StoreException:
|
except Exception: # noqa: BLE001
|
||||||
self._orderable = False
|
self._orderable = False
|
||||||
_LOGGER.warning(
|
_LOGGER.warning(
|
||||||
"Attempted to order Dominos - Order invalid or store closed"
|
"Attempted to order Dominos - Order invalid or store closed"
|
||||||
|
@ -6,5 +6,5 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/dominos",
|
"documentation": "https://www.home-assistant.io/integrations/dominos",
|
||||||
"iot_class": "cloud_polling",
|
"iot_class": "cloud_polling",
|
||||||
"loggers": ["pizzapi"],
|
"loggers": ["pizzapi"],
|
||||||
"requirements": ["pizzapi==0.0.3"]
|
"requirements": ["pizzapi==0.0.6"]
|
||||||
}
|
}
|
||||||
|
@ -1557,7 +1557,7 @@ pigpio==1.78
|
|||||||
pilight==0.1.1
|
pilight==0.1.1
|
||||||
|
|
||||||
# homeassistant.components.dominos
|
# homeassistant.components.dominos
|
||||||
pizzapi==0.0.3
|
pizzapi==0.0.6
|
||||||
|
|
||||||
# homeassistant.components.plex
|
# homeassistant.components.plex
|
||||||
plexauth==0.0.6
|
plexauth==0.0.6
|
||||||
|
Loading…
x
Reference in New Issue
Block a user