Remove usage of async_add_job in tests (#113259)
This commit is contained in:
parent
c3b5e819c5
commit
c1f5c7c4b7
11 changed files with 22 additions and 22 deletions
|
@ -19,7 +19,7 @@ from homeassistant.loader import bind_hass
|
|||
@bind_hass
|
||||
def async_increment(hass, entity_id):
|
||||
"""Increment a counter."""
|
||||
hass.async_add_job(
|
||||
hass.create_task(
|
||||
hass.services.async_call(DOMAIN, SERVICE_INCREMENT, {ATTR_ENTITY_ID: entity_id})
|
||||
)
|
||||
|
||||
|
@ -28,7 +28,7 @@ def async_increment(hass, entity_id):
|
|||
@bind_hass
|
||||
def async_decrement(hass, entity_id):
|
||||
"""Decrement a counter."""
|
||||
hass.async_add_job(
|
||||
hass.create_task(
|
||||
hass.services.async_call(DOMAIN, SERVICE_DECREMENT, {ATTR_ENTITY_ID: entity_id})
|
||||
)
|
||||
|
||||
|
@ -37,6 +37,6 @@ def async_decrement(hass, entity_id):
|
|||
@bind_hass
|
||||
def async_reset(hass, entity_id):
|
||||
"""Reset a counter."""
|
||||
hass.async_add_job(
|
||||
hass.create_task(
|
||||
hass.services.async_call(DOMAIN, SERVICE_RESET, {ATTR_ENTITY_ID: entity_id})
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue