add "actual_gain" information (#2600)

This commit is contained in:
Z3LIFF 2023-01-17 16:17:35 -05:00 committed by GitHub
parent 9c5afcbec1
commit 170f9fa40b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,6 +59,10 @@ Since those are two different physical infrared sensor readings, there is the po
If you are not happy with that built-in calculation, you have the raw data you need to do your own. If you are not happy with that built-in calculation, you have the raw data you need to do your own.
The manufacturer, AMS, has a few application notes that discuss this topic. The manufacturer, AMS, has a few application notes that discuss this topic.
See the references. See the references.
- **actual_gain**: The actual gain value being used for values reported. Updates whenever ``gain`` is changed,
which is especially useful when the sensor is set to ``gain: auto`` to help denote relative brightness when
extreme changes in brightness are encountered.
Values reported are said to be in units of ``lux``, but there are some things to understand about that. Values reported are said to be in units of ``lux``, but there are some things to understand about that.
@ -85,6 +89,7 @@ Values reported are said to be in units of ``lux``, but there are some things to
id: "my_tls2591" id: "my_tls2591"
address: 0x29 address: 0x29
update_interval: 60s update_interval: 60s
gain: auto
device_factor: 53 device_factor: 53
glass_attenuation_factor: 14.4 glass_attenuation_factor: 14.4
visible: visible:
@ -96,6 +101,9 @@ Values reported are said to be in units of ``lux``, but there are some things to
calculated_lux: calculated_lux:
id: i_lux id: i_lux
name: "TSL2591 Lux" name: "TSL2591 Lux"
actual_gain:
id: "actual_gain"
name: "TSL2591 actual gain"
Configuration variables: Configuration variables:
------------------------ ------------------------
@ -164,6 +172,11 @@ Each configured sensor is reported separately on each ``update_interval``.
- **name** (**Required**, string): The name for the sensor. - **name** (**Required**, string): The name for the sensor.
- All other options from :ref:`Sensor <config-sensor>`. - All other options from :ref:`Sensor <config-sensor>`.
- **actual_gain** (*Optional*): The value of gain used for reported values. Particularly useful when gain is set to "auto".
- **name** (**Required**, string): The name for the sensor.
- All other options from :ref:`Sensor <config-sensor>`.
Power save mode Power save mode
............... ...............
Sensor readings are only taken when the device indicates that the ADC values are valid. Sensor readings are only taken when the device indicates that the ADC values are valid.