commit | c0448f0729f2eea6cf1160d3d6a723e2983a443e | [log] [tgz] |
---|---|---|
author | Chris Austen <austenc@us.ibm.com> | Tue Jan 12 16:01:30 2016 -0600 |
committer | Chris Austen <austenc@us.ibm.com> | Tue Jan 12 16:01:30 2016 -0600 |
tree | 69758ad0007ec20105ceaf7d071b0a145955c326 | |
parent | 3939e2d5752030e383efd37aa70f28a005fae7a0 [diff] |
Reset the OS power state when the system is powered off
diff --git a/bin/Sensors.py b/bin/Sensors.py index a143a8f..cf80a01 100755 --- a/bin/Sensors.py +++ b/bin/Sensors.py
@@ -189,5 +189,8 @@ def __init__(self,bus,name): VirtualSensor.__init__(self,bus,name) self.setValue("Off") - + bus.add_signal_receiver(self.SystemStateHandler,signal_name = "GotoSystemState") + def SystemStateHandler(self,state): + if (state == "HOST_POWERED_OFF"): + self.setValue("Off")