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'))
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))
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'))