Powiadomienia
Wyczyść wszystko

AFE Firmware T6 [Rozwiązany] Błąd w HA dla czujnika BME280

14 Wpisów
3 Użytkownicy
2 Likes
482 Wyświetleń
isom
Wpisów: 5085
 isom
Moderator Zasłużony dla Forum, Donator 2K19, Donator 2K20
Autor tematu
(@isom)
Szef wszystkich szefów
Dołączył: 6 lat temu

@adrian dostaję cyklicznie sporo błędów ziązanych z BME 280 w stacji pogodowej, wersja T6

7

 Nie ograniam pythona, więc nie umiem do końca zinterpretować przyczyny, ale może zerkniesz w wolnej chwili co z tym da się zrobić.

Z góry Dzięki 

Typ AFE Firmware
Wersja
3.6.0 B4
Sprzęt
ESP32
13 Odpowiedzi
adrian
Wpisów: 3982
Admin Zasłużony dla Forum, Patron Strony
(@adrian)
Szefu
Dołączył: 10 lat temu

mozesz przechwycic tego JSON w MQTT Explorer? Bo w tym screenie jakby ucięty i nie wiem czy uciety przychodzi z AFE?

isom
Wpisów: 5085
 isom
Moderator Zasłużony dla Forum, Donator 2K19, Donator 2K20
Autor tematu
(@isom)
Szef wszystkich szefów
Dołączył: 6 lat temu

Całość 

{
  "temperature": {
    "value": 17.7,
    "value": 17.74,
    "unit": "C",
    "correction": 0
  },
  "pressure": {
    "value": 997.3739,
    "value": 997.4386,
    "unit": "hPa",
    "correction": 0
  },
  "relativePressure": {
    "value": 1015.316,
    "value": 1015.379,
    "unit": "hPa"
  },
  "dewPoint": {
    "value": 2.887417,
    "value": 2.760686,
    "unit": "C"
  },
  "humidity": {
    "value": 37.12012,
    "value": 36.69531,
    "unit": "%H",
    "correction": 0,
    "rating": 3
  },
  "absoluteHumidity": {
    "value": 5.598656,
    "value": 5.547799,
    "unit": "%H"
  },
  "heatIndex": {
    "value": 16.4948,
    "value": 16.52771,
    "unit": "C"
  },
  "perception": {
    "value": 0,
    "description": "Dla niektórych trochę sucho"
  },
  "comfort": {
    "value": 2,
    "ratio": 87.31927,
    "ratio": 87.38606,
    "unit": "%",
    "description": "Za zimno"
  }
}
Comparing with previous message: + 8 lines, - 8 lines

bme/zew

I cały opis błędu

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 581, in state
    numerical_value = int(value)
                      ^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'Za gorąco'

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

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/mqtt/models.py", line 270, in process_write_state_requests
    entity.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 590, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 654, in _async_write_ha_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 596, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 585, in state
    raise ValueError(
ValueError: Sensor sensor.temz_poziom_komfortu has device class 'humidity', state class 'None' unit '' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'Za gorąco' (<class 'str'>)
Mariusz
Wpisów: 228
Donator 2K23
(@mariusz-2)
Weteran
Dołączył: 2 lata temu

Dodane przez: @isom

ValueError: Sensor sensor.temz_poziom_komfortu has device class 'humidity', state class 'None' unit '' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'Za gorąco' (<class 'str'>)

Skoro sensor oczekuje wartości numerycznej a otrzymuje string, to może zamiast deklarowanej device_class humidity powinien mieć device_class: enum ?

  • enum: Has a limited set of (non-numeric) states

https://www.home-assistant.io/integrations/sensor/

isom
Wpisów: 5085
 isom
Moderator Zasłużony dla Forum, Donator 2K19, Donator 2K20
Autor tematu
(@isom)
Szef wszystkich szefów
Dołączył: 6 lat temu

Może faktycznie warto spróbować zmienić klasę, według sugestii @mariusz-2 , teraz i tak nie widać tego co wysyła AFE

2

 

Strona 1 / 2
Udostępnij: