I am using Multiscrape to get gas and water prices from my utility. All works well except for one field. If I look at the response in the response file the value is there, but for some reason Multiscrape doesn’t see it. I’m sure I am just missing something but can’t figure it out despite searching and trying different suggestions. Any help would be appreciated!
Config (the first three work just fine, it’s the last one “monthly unit charge” that does not work)
scan_interval: 14400
sensor:
- unique_id: mud_gas_service_charge
name: Utility - MUD - Gas Service Charge
icon: mdi:currency-usd
select: ".field-node--body > div:nth-child(1) > div:nth-child(1) > table:nth-child(13) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(2)"
value_template: "{{ value.replace('$', '') }}"
- unique_id: mud_gas_infrastructure_charge
name: Utility - MUD - Gas Infrastructure Charge
icon: mdi:currency-usd
select: ".field-node--body > div:nth-child(1) > div:nth-child(1) > table:nth-child(13) > tbody:nth-child(1) > tr:nth-child(2) > td:nth-child(2)"
value_template: "{{ value.replace('$', '') }}"
- unique_id: mud_gas_base_unit_charge
name: Utility - MUD - Gas Base Unit Charge
icon: mdi:currency-usd
select: ".field-node--body > div:nth-child(1) > div:nth-child(1) > table:nth-child(13) > tbody:nth-child(1) > tr:nth-child(3) > td:nth-child(2)"
value_template: "{{ value.replace('$', '0') }}"
- unique_id: mud_gas_monthly_unit_charge
name: Utility - MUD - Gas Monthly Unit Charge
icon: mdi:currency-usd
select: ".field-node--body > div:nth-child(1) > div:nth-child(1) > table:nth-child(30) > tbody:nth-child(3) > tr:nth-child(4) > td:nth-child(6)"
value_template: "{{ value.replace('$', '') }}"
force_update: true
log_response: true
#parser: html.parser
headers:
User-Agent: Mozilla/5.0
Field from Site:
Log
2022-04-10 08:22:24 DEBUG (MainThread) [custom_components.multiscrape.scraper] Scraper_noname_1 # Utility - MUD - Gas Monthly Unit Charge # Select selected tag: None
2022-04-10 08:22:24 DEBUG (MainThread) [custom_components.multiscrape.sensor] Scraper_noname_1 # Utility - MUD - Gas Monthly Unit Charge # Exception selecting sensor data: 'NoneType' object has no attribute 'name'
HINT: Use debug logging and log_response for further investigation!
2022-04-10 08:22:24 ERROR (MainThread) [custom_components.multiscrape.sensor] Scraper_noname_1 # Utility - MUD - Gas Monthly Unit Charge # Unable to extract data
2022-04-10 08:22:24 DEBUG (MainThread) [custom_components.multiscrape.sensor] Scraper_noname_1 # Utility - MUD - Gas Monthly Unit Charge # On-error, set value to None
2022-04-10 08:22:24 DEBUG (MainThread) [custom_components.multiscrape.entity] Scraper_noname_1 # Utility - MUD - Gas Monthly Unit Charge # Updated sensor and attributes, now adding to HA
Page Response
Sensor Value