jaroschek / home-assistant-eaton-ups

Custom Home Assistant integration for Eaton UPS devices and sensors through SNMP.
3 stars 0 forks source link

Not actively polling for updates #16

Open 23534664 opened 2 months ago

23534664 commented 2 months ago

How do you set up the polling rate as this only updates the sensors once and does not automaticaly pole the sensors.

23534664 commented 2 months ago

image

23534664 commented 2 months ago

Logger: homeassistant Source: custom_components/eaton_ups/sensor.py:196 integration: Eaton UPS (documentation, issues) First occurred: 2:47:20 PM (21 occurrences) Last logged: 3:07:48 PM

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 414, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners update_callback() File "/config/custom_components/eaton_ups/sensor.py", line 132, in _handle_coordinator_update super().async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1009, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1132, in _async_write_ha_state state, attr, capabilities, shadowed_attr = 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 1015, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 543, in state value = self.native_value ^^^^^^^^^^^^^^^^^ File "/config/custom_components/eaton_ups/sensor.py", line 196, in native_value datetime.strptime(self._attr_native_value, "%m/%d/%Y") File "/usr/local/lib/python3.12/_strptime.py", line 554, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/_strptime.py", line 333, in _strptime raise ValueError("time data %r does not match format %r" % ValueError: time data '' does not match format '%m/%d/%Y'