sensor:
- platform: ks_gas_sensor
username: !secret ks_gas_username
password: !secret ks_gas_password
account: 12345678 (optional)
- Status
- Credit Rating
- Consumption
- Address
- Last Payment Date
- Last Payment
- Ammount Due
- Due Date
- Past Due
Pull data from Kansas Gas into Home Assistant
License: GNU General Public License v3.0
sensor:
- platform: ks_gas_sensor
username: !secret ks_gas_username
password: !secret ks_gas_password
account: 12345678 (optional)
Had been working great, then maybe 10 days ago I started seeing this upon restart of HA:
2020-12-08 09:02:58 ERROR (SyncWorker_13) [custom_components.ks_gas_sensor.sensor] list index out of range
2020-12-08 09:02:58 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform ks_gas_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 316, in async_add_entities await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in _async_add_entity await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state sstate = self.state
File "/config/custom_components/ks_gas_sensor/sensor.py", line 108, in state return self._state
AttributeError: 'ks_gas_sensor' object has no attribute '_state'
2020-12-08 09:02:58 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up ks_gas_sensor platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 207, in _async_setup_platform await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 316, in async_add_entities await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in _async_add_entity await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state
sstate = self.state
File "/config/custom_components/ks_gas_sensor/sensor.py", line 108, in state
return self._state
AttributeError: 'ks_gas_sensor' object has no attribute '_state'
2020-12-08 09:02:59 ERROR (SyncWorker_23) [custom_components.ks_gas_sensor.sensor] list index out of range
2020-12-08 09:03:00 ERROR (SyncWorker_13) [custom_components.ks_gas_sensor.sensor] list index out of range
2020-12-08 09:03:01 ERROR (SyncWorker_1) [custom_components.ks_gas_sensor.sensor] list index out of range
2020-12-08 09:03:02 ERROR (SyncWorker_18) [custom_components.ks_gas_sensor.sensor] list index out of range
2020-12-08 09:03:02 ERROR (SyncWorker_4) [custom_components.ks_gas_sensor.sensor] list index out of range
I tried changing logging level to debug but didn't seem to change log output. Glad to help debug if you're still open to working on this.
Thanks!
I just noticed that the component is not able to login successfully. To be honest, I don't know how long it's been failing, as I haven't been paying attention to the sensor values. But now I would like to include the consumption reported into the HA Energy dashboard, so would like to get this working.
I'm still able to login interactively to the Kansas Gas web and app with the credentials I'm providing the component. Has the API changed? Any other information I can provide to help troubleshoot? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.