Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSSI sensor creates issues on log #674

Open
WorldOfGZ opened this issue Sep 16, 2024 · 1 comment
Open

RSSI sensor creates issues on log #674

WorldOfGZ opened this issue Sep 16, 2024 · 1 comment
Labels
Bug Something isn't working

Comments

@WorldOfGZ
Copy link

Description

Hello.
I use this integration for 2 cam TAPO, with last version.
It seems sometimes when the rssi sensor goes to unavailable, that create an entry on the log.
Everything other works, I downgrade firmware since long time.

Not a big issue, but maybe something to check when some times.

Reproduction Steps

Just check the log, probably there is the error.

Expected behavior

No error on log

If applicable, add error logs.

Enregistreur: homeassistant
Source: components/sensor/__init__.py:664
S'est produit pour la première fois: 03:14:35 (4 occurrences)
Dernier enregistrement: 10:21:44

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 662, in state
    numerical_value = float(value)  # type:ignore[arg-type]
                      ^^^^^^^^^^^^
ValueError: could not convert string to float: 'unavailable'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 960, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 664, in state
    raise ValueError(
ValueError: Sensor sensor.tapo_cam_1_rssi has device class 'None', state class 'measurement' unit 'dBm' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unavailable' (<class 'str'>)

Device Firmware

1.3.7 Build 230920 Rel.60220n(4555)

Integration Version

5.6.1

Using stream component

Yes

Does camera work via official integrations?

Yes

Camera has all attributes filled out in developer tools

Yes

HASS Environment

Proxmox

Search for similar issues

Yes

Additional information

No response

@susanacf90
Copy link

Having the same issue.

@JurajNyiri JurajNyiri added the Bug Something isn't working label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants