Boas. Muito obrigado pela partilha, Eu estou a usar este componente (ultima versão) com HA 2022.8.7 e acontecem 2 coisas:
Para o posto 65156 no arranque do HA tenho:
...........
2022-10-02 00:16:39.486 DEBUG (MainThread) [custom_components.precoscombustiveis.dgeg] Fetching details for gas station Id:65156...
2022-10-02 00:16:42.012 ERROR (MainThread) [homeassistant.components.sensor] precoscombustiveis: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 477, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 702, in async_device_update
await task
File "/config/custom_components/precoscombustiveis/sensor.py", line 125, in async_update
self._state = gasStation.getPrice(self._fuelName)
File "/config/custom_components/precoscombustiveis/dgeg.py", line 62, in getPrice
return float(fuel["Preco"]
ValueError: could not convert string to float: '4.075 €/kg'
2022-10-02 00:16:44.538 WARNING (MainThread) [homeassistant.components.media_player] Setup of media_player platform denonavr is taking over 10 seconds.
2022-10-02 00:16:44.864 ERROR (MainThread) [homeassistant.components.sensor] precoscombustiveis: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 477, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 702, in async_device_update
await task
File "/config/custom_components/precoscombustiveis/sensor.py", line 125, in async_update
self._state = gasStation.getPrice(self._fuelName)
File "/config/custom_components/precoscombustiveis/dgeg.py", line 62, in getPrice
return float(fuel["Preco"]
ValueError: could not convert string to float: '4.178 €/kg'
.........
E a segunda situação é que o attributo “LastPriceUpdate” so atualiza quando renicio o HA ficando com esse “timestamp” para sempre mesmo quando o peço muda.