Exemplo n.º 1
0
def toggle_rodi_zone():
    log.debug('toggle_rodi_zone() called')
    zone = 'zone28'
    is_zone_enabled = neptune.zone_enabled(zone)
    if is_zone_enabled:
        neptune.disable_zone(zone)
    else:
        neptune.enable_zone(zone)
    return redirect(url_for('rodi'))
Exemplo n.º 2
0
def toggle_power_zone(id):
    zone = f'power{id}'
    log.debug(f'toggle_power_zone() called with powerzone: {zone}')
    is_zone_enabled = neptune.zone_enabled(zone)
    if is_zone_enabled:
        neptune.disable_zone(zone)
    else:
        neptune.enable_zone(zone)
    return redirect(url_for('power', id=id))
Exemplo n.º 3
0
def toggle_source_zones(zone):
    log.debug(f'toggle_source_zones() called with zone: {zone}')
    zone = f'{zone}_water'
    is_zone_enabled = neptune.zone_enabled(zone)
    if is_zone_enabled:
        neptune.disable_zone(zone)
    else:
        neptune.enable_zone(zone)
    return redirect(url_for('water_source'))