def turn_off(hass, entity_id=None):
    data = {ATTR_ENTITY_ID: entity_id} if entity_id else None
    hass.services.call(DOMAIN, SERVICE_TURN_OFF, data)
Return True if the queue is empty, False otherwise (not reliable!).
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/switch/__init__.py/turn_off--crossover with--dataset/ETHPy150Open ralfonso/theory/theory/model/mpdqueue.py/Queue.empty