diff --git a/obmc/sensors.py b/obmc/sensors.py
index 64eadef..49a4797 100644
--- a/obmc/sensors.py
+++ b/obmc/sensors.py
@@ -50,52 +50,6 @@
 CONTROL_IFACE = 'org.openbmc.Control'
 
 
-class PowerSupplyRedundancySensor(VirtualSensor):
-    def __init__(self, bus, name):
-        VirtualSensor.__init__(self, bus, name)
-        self.bus = bus
-        self.bus_name = 'xyz.openbmc_project.Settings'
-        self.obj_path = '/xyz/openbmc_project/control/power_supply_redundancy'
-        self.iface = 'xyz.openbmc_project.Control.PowerSupplyRedundancy'
-        self.prop_iface = 'org.freedesktop.DBus.Properties'
-        self.property_name = 'PowerSupplyRedundancyEnabled'
-        super(PowerSupplyRedundancySensor, self).setValue(self.getValue())
-
-    # Override setValue method
-    @dbus.service.method(
-        SensorValue.IFACE_NAME, in_signature='v', out_signature='')
-    def setValue(self, value):
-        if (value == "Enabled"):
-            intf = self.getPowerSupplyInterface()
-            intf.Set(self.iface, self.property_name, True)
-        elif (value == "Disabled"):
-            intf = self.getPowerSupplyInterface()
-            intf.Set(self.iface, self.property_name, False)
-        else:
-            print("Invalid Power Supply Redundancy value")
-            return
-        super(PowerSupplyRedundancySensor, self).setValue(value)
-
-    # Override getValue method
-    @dbus.service.method(
-        SensorValue.IFACE_NAME, in_signature='', out_signature='v')
-    def getValue(self):
-        intf = self.getPowerSupplyInterface()
-        value = intf.Get(self.iface, self.property_name)
-        if (value == 1):
-            return "Enabled"
-        elif (value == 0):
-            return "Disabled"
-        else:
-            print("Unable to determine Power Supply Redundancy value")
-            return ""
-
-    def getPowerSupplyInterface(self):
-        obj = self.bus.get_object(self.bus_name, self.obj_path,
-                                  introspect=True)
-        return dbus.Interface(obj, self.prop_iface)
-
-
 class PowerSupplyDeratingSensor(VirtualSensor):
     def __init__(self, bus, name):
         VirtualSensor.__init__(self, bus, name)
