Hi, I’m trying to scrape my Generac PwrCell inverter with the custom multiscrape component, and I can correctly scrape the solar panel production (Energy Today), but can’t for the life of my get the Battery Charge %. I’m not very proficient in CSS and don’t know what I’m doing wrong. Sorry if I posted in the wrong place, wasn’t sure where this question should be asked.
Here’s my current code:
multiscrape:
- resource: https://pwrcell.generac.com/users/XXXXX/dashboard
username: "user"
password: "pass"
sensor:
- select: "#content > div > div > div > div.row-fluid.dash-statistics > div:nth-child(1) > div:nth-child(2) > h4"
value_template: '{{ value.rstrip(" kWh") | float }}'
unit_of_measurement: "kWh"
unique_id: generac_inverter_energy_today
name: Generac Energy Today
- resource: https://pwrcell.generac.com/users/XXXXX/dashboard
username: "user"
password: "pass"
sensor:
- select: "#content > div > div > div > div.row-fluid.dash-statistics > div:nth-child(3) > div:nth-child(1) > h4"
unique_id: generac_inverter_home_backup_charge
value_template: '{{ value.rstrip("%") | float }}'
name: Generac Backup Charge %
unit_of_measurement: "%"
on_error:
log: debug
value: last
Here’s a screenshot of the pages CSS.
They highlighted part is the part that includes the Battery %. If I right click and copy > copy selector, I only get #battery-charge, and putting the id directly doesn’t seem to work. I’ve tried to put it directly in the CSS path in my yaml, and then add the id at the end but that doesn’t work either. Anyone have any tips or something I’m overlooking? I’ve tried multiple variations and even tried to get the value from another place on that dashboard, but I still am stuck. Any help would be greatly appreciated!