I am trying to extract the propane usage from Amerigas web site.
Site login: AmeriGas Login
Loaded Dashboard page: SessionExpired
Using Chrome and inspect copy selector-…I have the following select value:…
#layoutDiv > main > div.container.pl-0.pr-0.pl-xl-3.pr-xl-3.pl-lg-3.pr-lg-3.pl-md-3.pr-md-3.pl-sm-0.pr-sm-0 > div:nth-child(2) > div.col-12.col-xl-6.col-lg-6.col-md-12.col-sm-12.pl-0.pr-0.pr-xl-3.pr-lg-3.pr-md-0.pr-sm-0 > div.col-12.bg-white.tankanddeliveries-padding.top-margin > div:nth-child(3) > div.col-12.col-xl-4.col-lg-4.col-md-12.col-sm-12.p-0.mt-3.EstimatedTankDiv > div > div.col-12.p-0.lblvalue-Estimatedtank
Here is my config file:
multiscrape:
- resource: https://myamerigas.amerigas.com/Dashboard/Dashboard
scan_interval: 3600
headers:
User-Agent: Mozilla/5.0
form_submit:
submit_once: True
resource: https://myamerigas.amerigas.com/Login/Login?BrandId=002
select: "#form-control-valid"
input:
email: farberm@me.com
password: Bohica8899
sensor:
- select: "#layoutDiv > main > div.container.pl-0.pr-0.pl-xl-3.pr-xl-3.pl-lg-3.pr-lg-3.pl-md-3.pr-md-3.pl-sm-0.pr-sm-0 > div:nth-child(2) > div.col-12.col-xl-6.col-lg-6.col-md-12.col-sm-12.pl-0.pr-0.pr-xl-3.pr-lg-3.pr-md-0.pr-sm-0 > div.col-12.bg-white.tankanddeliveries-padding.top-margin > div:nth-child(3) > div.col-12.col-xl-4.col-lg-4.col-md-12.col-sm-12.p-0.mt-3.EstimatedTankDiv > div > div.col-12.p-0.lblvalue-Estimatedtank"
unit_of_measurement: "%"
name: Tankpercentage
- unique_id: Tank_percentage
I am getting the following error however…
Error while setting up multiscrape platform for sensor
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 249, in _async_setup_platform
await asyncio.shield(task)
File “/config/custom_components/multiscrape/sensor.py”, line 56, in async_setup_platform
sensor_selector = Selector(hass, conf)
File “/config/custom_components/multiscrape/selector.py”, line 31, in init
raise ValueError(
ValueError: Selector error: either select, select_list or a value template should be provided.
Any help would be greatly appreciated as to what I am doing wrong?
1 post - 1 participant