1# sensors 2 3## Description 4 5An array of sensor objects that make up the fan enclosure object. The sensors 6are what's monitored to determine the functional state of the fan. 7 8A sensor's functional range is determined by the following equation(where 9_[target]_ is current requested target of the fan): 10 11- Minimum = ([target] _(100 - [`deviation`](deviation.md)) / 100)_ `factor` + 12 `offset` 13- Maximum = ([target] _(100 + [`deviation`](deviation.md)) / 100)_ `factor` + 14 `offset` 15 16Therefore, a fan sensor must be above the minimum and less than the maximum to 17be deemed functional. 18 19## Attribute Value(s) 20 21- `name` - string 22 - The name of the fan tach sensors located under the 23 `/xyz/openbmc_project/sensors/fan_tach` D-Bus path. 24- `has_target` - boolean 25 - Whether this sensor D-Bus object contains the `Target` property or not. 26- `target_interface` - string (Optional) 27 - The D-Bus interface containing the `Target` property. This defaults to 28 `xyz.openbmc_project.Control.FanSpeed` for RPM controlled fans or can be set 29 to `xyz.openbmc_project.Control.FanPwm` for PWM controlled fans. 30- `target_path` - string (Optional) 31 - The D-Bus full object path containing the `Target` property. This defaults 32 to `/xyz/openbmc_project/sensors/fan_tach`+`name`. 33- `factor` - double (Optional) 34 - A value to multiply the current target by to adjust the monitoring of this 35 sensor due to how the hardware works. This sensor attribute is optional and 36 defaults to 1.0. 37- `offset` - integer (Optional) 38 - A value to shift the current target by to adjust the monitoring of this 39 sensor due to how the hardware works. This sensors attribute is optional and 40 defaults to 0. 41 42## Example 43 44```json 45{ 46 "fans": [ 47 { 48 "inventory": "/system/chassis/motherboard/fan0", 49 "allowed_out_of_range_time": 30, 50 "functional_delay": 5, 51 "deviation": 15, 52 "num_sensors_nonfunc_for_fan_nonfunc": 1, 53 "monitor_start_delay": 30, 54 "fan_missing_error_delay": 20, 55 "nonfunc_rotor_error_delay": 0, 56 "sensors": [ 57 { 58 "name": "fan0_0", 59 "has_target": true, 60 "target_interface": "xyz.openbmc_project.Control.FanPwm", 61 "target_path": "/xyz/openbmc_project/control/fanpwm/PWM0" 62 }, 63 { 64 "name": "fan0_1", 65 "has_target": false, 66 "factor": 1.45, 67 "offset": -909 68 } 69 ] 70 } 71 ] 72} 73``` 74