Closed methodnet closed 4 years ago
It seems like the radon sensors has crashed, could you by any chance be using imperial units, that is at least untested by me, if so you could maybe change to metric to test if that works...
Also it would be nice to have the log from the start where it finds and populates the sensors.
Yes, flipping to Metric added the entities... Anyway we can fix this for us non-metric folk? :) Here was the error:
2020-04-15 12:44:50 ERROR (MainThread) [homeassistant.components.sensor] airthings_wave: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 324, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 476, in async_device_update await self.hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, self.kwargs) File "/config/custom_components/airthings_wave/sensor.py", line 237, in update self._state = round(float(value self._sensor_specifics.unit_scale, 2)) TypeError: float expected at most 1 arguments, got 2 2020-04-15 12:44:50 ERROR (MainThread) [homeassistant.components.sensor] airthings_wave: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 324, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 476, in async_device_update await self.hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/airthings_wave/sensor.py", line 237, in update self._state = round(float(value * self._sensor_specifics.unit_scale, 2))
Had a silly syntax error. Should be good now. I'll publish a new release but could take a while before your HACS cache is rebuilt.
Hello,
Just added this component this morning and connected without issue.
Radon data is not populating. I can see it is collecting the 1day_avg and longterm_avg but there is no entity/sensor that the data is going to.
Log:
2020-04-15 11:35:02 DEBUG (SyncWorker_10) [custom_components.airthings_wave.airthings] XX:XX:XX:XX:XX:XX Got sensordata {'date_time': '2020-04-15T11:35:02.601644', 'humidity': 38.0, 'radon_1day_avg': 34, 'radon_longterm_avg': 51, 'temperature': 17.18, 'rel_atm_pressure': 1001.12, 'co2': 466.0, 'voc': 411.0} 2020-04-15 11:35:02 INFO (SyncWorker_10) [pygatt.backends.gatttool.gatttool] Stopping 2020-04-15 11:35:02 INFO (Thread-28) [pygatt.backends.gatttool.gatttool] Listener thread finished 2020-04-15 11:35:02 DEBUG (SyncWorker_10) [custom_components.airthings_wave.sensor] State XX:XX:XX:XX:XX:XX-date_time 2020-04-15T11:35:02.601644 2020-04-15 11:35:02 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.xx_xx_xx_xx_xx_xx_date_time, old_state=<state sensor.xx_xx_xx_xx_xx_xx_date_time=2020-04-15T11:33:01.603828; device_date_time=2020-04-15T11:33:01.603828, unit_of_measurement=time, friendly_name=XX:XX:XX:XX:XX:XX-date_time @ 2020-04-15T11:33:01.966644-04:00>, new_state=<state sensor.xx_xx_xx_xx_xx_xx_date_time=2020-04-15T11:35:02.601644; device_date_time=2020-04-15T11:35:02.601644, unit_of_measurement=time, friendly_name=XX:XX:XX:XX:XX:XX-date_time @ 2020-04-15T11:35:02.965606-04:00>> 2020-04-15 11:35:02 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.1829668560] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=sensor.xx_xx_xx_xx_xx_xx_date_time, old_state=<state sensor.xx_xx_xx_xx_xx_xx_date_time=2020-04-15T11:33:01.603828; device_date_time=2020-04-15T11:33:01.603828, unit_of_measurement=time, friendly_name=XX:XX:XX:XX:XX:XX-date_time @ 2020-04-15T11:33:01.966644-04:00>, new_state=<state sensor.xx_xx_xx_xx_xx_xx_date_time=2020-04-15T11:35:02.601644; device_date_time=2020-04-15T11:35:02.601644, unit_of_measurement=time, friendly_name=XX:XX:XX:XX:XX:XX-date_time @ 2020-04-15T11:35:02.965606-04:00>>} 2020-04-15 11:35:02 DEBUG (SyncWorker_9) [custom_components.airthings_wave.sensor] State XX:XX:XX:XX:XX:XX-humidity 38.0 2020-04-15 11:35:02 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.xx_xx_xx_xx_xx_xx_humidity, old_state=<state sensor.xx_xx_xx_xx_xx_xx_humidity=38.0; device_date_time=2020-04-15T11:33:01.603828, unit_of_measurement=%, friendly_name=XX:XX:XX:XX:XX:XX-humidity, device_class=humidity @ 2020-04-15T11:20:51.443701-04:00>, new_state=<state sensor.xx_xx_xx_xx_xx_xx_humidity=38.0; device_date_time=2020-04-15T11:35:02.601644, unit_of_measurement=%, friendly_name=XX:XX:XX:XX:XX:XX-humidity, device_class=humidity @ 2020-04-15T11:20:51.443701-04:00>> 2020-04-15 11:35:02 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.1829668560] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=sensor.xx_xx_xx_xx_xx_xx_humidity, old_state=<state sensor.xx_xx_xx_xx_xx_xx_humidity=38.0; device_date_time=2020-04-15T11:33:01.603828, unit_of_measurement=%, friendly_name=XX:XX:XX:XX:XX:XX-humidity, device_class=humidity @ 2020-04-15T11:20:51.443701-04:00>, new_state=<state sensor.xx_xx_xx_xx_xx_xx_humidity=38.0; device_date_time=2020-04-15T11:35:02.601644, unit_of_measurement=%, friendly_name=XX:XX:XX:XX:XX:XX-humidity, device_class=humidity @ 2020-04-15T11:20:51.443701-04:00>>} 2020-04-15 11:35:03 DEBUG (SyncWorker_7) [custom_components.airthings_wave.sensor] State XX:XX:XX:XX:XX:XX-temperature 17.18 2020-04-15 11:35:03 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.xx_xx_xx_xx_xx_xx_temperature, old_state=<state sensor.xx_xx_xx_xx_xx_xx_temperature=63.01; device_date_time=2020-04-15T11:33:01.603828, unit_of_measurement=°F, friendly_name=XX:XX:XX:XX:XX:XX-temperature, device_class=temperature @ 2020-04-15T11:31:01.517199-04:00>, new_state=<state sensor.xx_xx_xx_xx_xx_xx_temperature=62.92; device_date_time=2020-04-15T11:35:02.601644, unit_of_measurement=°F, friendly_name=XX:XX:XX:XX:XX:XX-temperature, device_class=temperature @ 2020-04-15T11:35:03.012796-04:00>> 2020-04-15 11:35:03 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.1829668560] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=sensor.xx_xx_xx_xx_xx_xx_temperature, old_state=<state sensor.xx_xx_xx_xx_xx_xx_temperature=63.01; device_date_time=2020-04-15T11:33:01.603828, unit_of_measurement=°F, friendly_name=XX:XX:XX:XX:XX:XX-temperature, device_class=temperature @ 2020-04-15T11:31:01.517199-04:00>, new_state=<state sensor.xx_xx_xx_xx_xx_xx_temperature=62.92; device_date_time=2020-04-15T11:35:02.601644, unit_of_measurement=°F, friendly_name=XX:XX:XX:XX:XX:XX-temperature, device_class=temperature @ 2020-04-15T11:35:03.012796-04:00>>} 2020-04-15 11:35:03 DEBUG (SyncWorker_12) [custom_components.airthings_wave.sensor] State XX:XX:XX:XX:XX:XX-rel_atm_pressure 1001.12 2020-04-15 11:35:03 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.xx_xx_xx_xx_xx_xx_rel_atm_pressure, old_state=<state sensor.xx_xx_xx_xx_xx_xx_rel_atm_pressure=1001.14; device_date_time=2020-04-15T11:33:01.603828, unit_of_measurement=mbar, friendly_name=XX:XX:XX:XX:XX:XX-rel_atm_pressure, device_class=pressure @ 2020-04-15T11:31:01.551107-04:00>, new_state=<state sensor.xx_xx_xx_xx_xx_xx_rel_atm_pressure=1001.12; device_date_time=2020-04-15T11:35:02.601644, unit_of_measurement=mbar, friendly_name=XX:XX:XX:XX:XX:XX-rel_atm_pressure, device_class=pressure @ 2020-04-15T11:35:03.030145-04:00>> 2020-04-15 11:35:03 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.1829668560] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=sensor.xx_xx_xx_xx_xx_xx_rel_atm_pressure, old_state=<state sensor.xx_xx_xx_xx_xx_xx_rel_atm_pressure=1001.14; device_date_time=2020-04-15T11:33:01.603828, unit_of_measurement=mbar, friendly_name=XX:XX:XX:XX:XX:XX-rel_atm_pressure, device_class=pressure @ 2020-04-15T11:31:01.551107-04:00>, new_state=<state sensor.xx_xx_xx_xx_xx_xx_rel_atm_pressure=1001.12; device_date_time=2020-04-15T11:35:02.601644, unit_of_measurement=mbar, friendly_name=XX:XX:XX:XX:XX:XX-rel_atm_pressure, device_class=pressure @ 2020-04-15T11:35:03.030145-04:00>>} 2020-04-15 11:35:03 DEBUG (SyncWorker_6) [custom_components.airthings_wave.sensor] State XX:XX:XX:XX:XX:XX-co2 466.0 2020-04-15 11:35:03 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.xx_xx_xx_xx_xx_xx_co2, old_state=<state sensor.xx_xx_xx_xx_xx_xx_co2=469.0; device_date_time=2020-04-15T11:33:01.603828, unit_of_measurement=ppm, friendly_name=XX:XX:XX:XX:XX:XX-co2, icon=mdi:periodic-table-co2, device_class=co2 @ 2020-04-15T11:31:01.588135-04:00>, new_state=<state sensor.xx_xx_xx_xx_xx_xx_co2=466.0; device_date_time=2020-04-15T11:35:02.601644, unit_of_measurement=ppm, friendly_name=XX:XX:XX:XX:XX:XX-co2, icon=mdi:periodic-table-co2, device_class=co2 @ 2020-04-15T11:35:03.061499-04:00>> 2020-04-15 11:35:03 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.1829668560] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=sensor.xx_xx_xx_xx_xx_xx_co2, old_state=<state sensor.xx_xx_xx_xx_xx_xx_co2=469.0; device_date_time=2020-04-15T11:33:01.603828, unit_of_measurement=ppm, friendly_name=XX:XX:XX:XX:XX:XX-co2, icon=mdi:periodic-table-co2, device_class=co2 @ 2020-04-15T11:31:01.588135-04:00>, new_state=<state sensor.xx_xx_xx_xx_xx_xx_co2=466.0; device_date_time=2020-04-15T11:35:02.601644, unit_of_measurement=ppm, friendly_name=XX:XX:XX:XX:XX:XX-co2, icon=mdi:periodic-table-co2, device_class=co2 @ 2020-04-15T11:35:03.061499-04:00>>} 2020-04-15 11:35:03 DEBUG (SyncWorker_19) [custom_components.airthings_wave.sensor] State XX:XX:XX:XX:XX:XX-voc 411.0 2020-04-15 11:35:03 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.xx_xx_xx_xx_xx_xx_voc, old_state=<state sensor.xx_xx_xx_xx_xx_xx_voc=421.0; device_date_time=2020-04-15T11:33:01.603828, unit_of_measurement=ppb, friendly_name=XX:XX:XX:XX:XX:XX-voc, icon=mdi:cloud, device_class=voc @ 2020-04-15T11:31:01.606367-04:00>, new_state=<state sensor.xx_xx_xx_xx_xx_xx_voc=411.0; device_date_time=2020-04-15T11:35:02.601644, unit_of_measurement=ppb, friendly_name=XX:XX:XX:XX:XX:XX-voc, icon=mdi:cloud, device_class=voc @ 2020-04-15T11:35:03.085583-04:00>>
Thank you! -J