diff --git a/devices/sensors.go b/devices/sensors.go index e4de96bd..d23d17d0 100644 --- a/devices/sensors.go +++ b/devices/sensors.go @@ -1,8 +1,8 @@ package devices type PowerSensor struct { - Name string ID string + Name string InputWatts float32 OutputWatts float32 LastOutputWatts float32 @@ -10,18 +10,21 @@ type PowerSensor struct { type TemperatureSensor struct { ID string + Name string ReadingCelsius float32 PhysicalContext string } type FanSensor struct { ID string + Name string Reading float32 PhysicalContext string } type ChassisHealth struct { ID string + Name string State string Health string } diff --git a/providers/redfish/sensors.go b/providers/redfish/sensors.go index c1fe5680..f26cc0d0 100644 --- a/providers/redfish/sensors.go +++ b/providers/redfish/sensors.go @@ -106,6 +106,7 @@ func (c *Conn) TemperatureSensors(ctx context.Context) ([]*devices.TemperatureSe t := &devices.TemperatureSensor{ ID: id, + Name: s.Name, PhysicalContext: s.PhysicalContext, ReadingCelsius: s.ReadingCelsius, } @@ -155,6 +156,7 @@ func (c *Conn) FanSensors(ctx context.Context) ([]*devices.FanSensor, error) { t := &devices.FanSensor{ ID: id, + Name: s.Name, PhysicalContext: s.PhysicalContext, Reading: s.Reading, } @@ -192,6 +194,8 @@ func (c *Conn) ChassisHealth(ctx context.Context) ([]*devices.ChassisHealth, err compatible++ h := &devices.ChassisHealth{ + ID: ch.ID, + Name: ch.Name, State: string(ch.Status.State), Health: string(ch.Status.Health), }