Home Assistant release with the issue: 0.72.0
Operating environment (Hass.io/Docker/Windows/etc.): Hassio
Component/platform: sensor.scrape
Description of problem:
I used this platform for the first time but it has some problems
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
sensor:
# 检测房产页面新帖子
- platform: scrape
resource: https://www.gaotang.cc/house/chushou/?dqid=1&key=&lx=0
name: 'new_message1'
select: "span.news"
- platform: scrape
resource: https://www.gaotang.cc/house/chushou/?dqid=1&key=&lx=0
name: 'new_message2'
select: "span.list_word"
value_template: '{{ value.split("(高唐)")[0] }}'
- platform: scrape
resource: https://www.gaotang.cc/house/chushou/?dqid=1&key=&lx=0
name: 'new_message5'
select: "enclosure:nth-of-type(1)"
attribute: url
- platform: scrape
resource: https://www.gaotang.cc/house/chushou/?dqid=1&key=&lx=0
name: 'new_message6'
select: " dt.dt2 a"
- platform: scrape
resource: https://www.gaotang.cc/house/chushou/?dqid=1&key=&lx=0
name: 'new_message_price'
select: "span.price"
Traceback (if applicable):
2018-06-30 05:34:23 ERROR (MainThread) [homeassistant.components.sensor] scrape: Error on device update!
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 320, in async_device_update
yield from self.hass.async_add_job(self.update)
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/homeassistant/components/sensor/scrape.py", line 118, in update
value = raw_data.select(self._select)[0][self._attr]
IndexError: list index out of range
2018-06-30 05:35:17 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting