Warning switch for hydraulic systems