diff --git a/redfish-core/lib/fan.hpp b/redfish-core/lib/fan.hpp index c10288df7e..08f3439b7e 100644 --- a/redfish-core/lib/fan.hpp +++ b/redfish-core/lib/fan.hpp @@ -36,7 +36,7 @@ namespace redfish { constexpr std::array fanInterface = { - "xyz.openbmc_project.Inventory.Item.Fan"}; + "xyz.openbmc_project.Sensor.Value"}; inline void updateFanList( const std::shared_ptr& asyncResp, @@ -65,16 +65,13 @@ inline void updateFanList( inline void getFanPaths( const std::shared_ptr& asyncResp, - const std::string& validChassisPath, + const std::string& /* validChassisPath */, const std::function& callback) { - sdbusplus::message::object_path endpointPath{validChassisPath}; - endpointPath /= "cooled_by"; - - dbus::utility::getAssociatedSubTreePaths( - endpointPath, - sdbusplus::message::object_path("/xyz/openbmc_project/inventory"), 0, + dbus::utility::getSubTreePaths( + "/xyz/openbmc_project/sensors/fan_tach", + 0, fanInterface, [asyncResp, callback]( const boost::system::error_code& ec,