Skip to content

Commit

Permalink
Fix mypy errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmsoft-tuxicoman committed Aug 11, 2024
1 parent cc80f22 commit a0f828e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mqtt_io/modules/sensor/veml6075.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ def setup_module(self) -> None:
self.sensor.set_shutdown(False)


def calculate_uv_index(self, sens_conf, uva, uvb, uv_comp1, uv_comp2) -> float:
def calculate_uv_index(self, sens_conf: ConfigType, \
uva: float, uvb: float, uv_comp1: float, uv_comp2: float) -> float:

"""
Calculate the UV index from received values.
"""
Expand All @@ -72,7 +74,7 @@ def calculate_uv_index(self, sens_conf, uva, uvb, uv_comp1, uv_comp2) -> float:
uva_index = uva_calc * sens_conf["UVAresp"]
uvb_index = uvb_calc * sens_conf["UVBresp"]
_LOG.debug("uva_index: %f uvb_index: %f", uva_index, uvb_index)
uv_index = (uva_index + uvb_index) / 2
uv_index: float = (uva_index + uvb_index) / 2.0
return uv_index

def get_value(self, sens_conf: ConfigType) -> SensorValueType:
Expand Down

0 comments on commit a0f828e

Please sign in to comment.