I’m trying to see if I can get power rates from my power company but these are only available after login. The class I’ve deciphered is .rate which identifies the four values shown below (and yes, I know our power is very expensive!).
I tried using the following but I get an unknown value from the sensor. I don’t know how to test if I’m even logging in let alone whether any data is returned. Anyone got any tips? Ideally all I need to extract is one value <$0.20c and one value >$0.20c as the morning and evening rates are always the same. The damn energy platform has sent me down a deep dark rabbit hole!
A login via a form is something else than HTTP basic/digest authenticating.
First find out if the values are present in the initial html and not being injected by Javascript (because then they cannot be scraped). Then try multiscrape form-submit.
I have updated as per your config, but on restart there is quite the log. Mainly around the following error:
2024-10-09 08:41:31.760 ERROR (MainThread) [homeassistant.components.sensor] Error adding entity sensor.powershop_offpeak for domain sensor with platform multiscrape
ValueError: Sensor sensor.powershop_offpeak has device class 'monetary', state class 'None' unit 'NZD/kWh' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unavailable' (<class 'str'>)
2024-10-09 08:41:31.934 ERROR (MainThread) [homeassistant.components.sensor] Error adding entity sensor.powershop_peak for domain sensor with platform multiscrape
ValueError: Sensor sensor.powershop_peak has device class 'monetary', state class 'None' unit 'NZD/kWh' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unavailable' (<class 'str'>)
2024-10-09 08:41:31.936 ERROR (MainThread) [homeassistant.components.sensor] Error adding entity sensor.powershop_weekend for domain sensor with platform multiscrape
ValueError: Sensor sensor.powershop_weekend has device class 'monetary', state class 'None' unit 'NZD/kWh' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unavailable' (<class 'str'>)
2024-10-09 08:41:31.938 ERROR (MainThread) [homeassistant.components.sensor] Error adding entity sensor.powershop_offpeak_special for domain sensor with platform multiscrape
ValueError: Sensor sensor.powershop_offpeak_special has device class 'monetary', state class 'None' unit 'NZD/kWh' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unavailable' (<class 'str'>)
2024-10-09 08:41:31.939 ERROR (MainThread) [homeassistant.components.sensor] Error adding entity sensor.powershop_peak_special for domain sensor with platform multiscrape
ValueError: Sensor sensor.powershop_peak_special has device class 'monetary', state class 'None' unit 'NZD/kWh' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unavailable' (<class 'str'>)
2024-10-09 08:41:31.941 ERROR (MainThread) [homeassistant.components.sensor] Error adding entity sensor.powershop_weekend_special for domain sensor with platform multiscrape
ValueError: Sensor sensor.powershop_weekend_special has device class 'monetary', state class 'None' unit 'NZD/kWh' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unavailable' (<class 'str'>)