Closed Suschibomber closed 2 weeks ago
Same for me, Camera.ADRESS no longer exists in Home Assistant since core update to 2024.11.0
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 365, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/tibber_custom/camera.py", line 26, in async_setup_platform
dev.append(TibberCam(home, hass))
^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tibber_custom/camera.py", line 45, in __init__
super().__init__(self._name, self._path)
TypeError: LocalFile.__init__() missing 1 required positional argument: 'unique_id'
from my logs
same here
@Danielhiversen Have you already found a solution?
Seems that it is a breaking change in last version of Home Assistant. I have not looked into it, and not sure when I will find time for that
Seems that it is a breaking change in last version of Home Assistant. I have not looked into it, and not sure when I will find time for that
Ok too bad. Have used your widget daily :( If I can do something, please let me know.
I manipulated parts of the camera.py file of the custom component a bit to get a „unique id“ and it’s working for me. but id say it’s rather dirty and probably not good coding (hardcoding) :-(
class TibberCam(LocalFile):
def __init__(self, home, hass):
matplotlib.use("Agg")
self._name = home.info["viewer"]["home"]["appNickname"]
if self._name is None:
self._name = home.info["viewer"]["home"]["address"].get("address1", "")
self._path = hass.config.path(f"www/prices_{self._name}.png")
self._home = home
self.hass = hass
self._cons_data = []
self._last_update = dt_util.now() - datetime.timedelta(hours=1)
self.realtime_state = None
self.unique_id = f"tibberprice_unique_id"
# hass.bus.async_listen_once(EVENT_HOMEASSISTANT_START, self._generate_fig)
# super().__init__(self._name, self._path)
super().__init__(self._name, self._path, self.unique_id)
@Danielhiversen made @mimainka's change into a PR, slightly extended to not hardcode the uid. Not that much of a contribution, just wanted to make it easy for you as you mentioned time constraints.
@TWitzenrath works like a charm for me. No errors in log as well.
@Danielhiversen made @mimainka's change into a PR, slightly extended to not hardcode the uid. Not that much of a contribution, just wanted to make it easy for you as you mentioned time constraints.
Sorry for the stupid question, but how can I find your solution with me so that it works again? Do I just have to paste your code into the file and it should run again?
@Suschibomber Just wait for the update. Or go to Settings->System->Updates and hit the refresh button, then the update should show up instantly
I installed the 0.52 but it still doesn't show me a graph. It's as if the image is not found, so such a symbol.
@Suschibomber did you restart homeassistant after updating? Is there anything in the logs?
@Suschibomber: the upgrate 0.52 created a new entity with the name camera.ADRESS_2. I used this new entity and at first this resulted in a strange picture but after the HA restart everything was fine.
Thanks to @Danielhiversen and @TWitzenrath for your support
@Suschibomber As an alternative: Check in your www/ folder for a file named „prices_youradress.png And then use the image card with /local/imagename.png
@Suschibomber: the upgrate 0.52 created a new entity with the name camera.ADRESS_2. I used this new entity and at first this resulted in a strange picture but after the HA restart everything was fine.
Thanks to @Danielhiversen and @TWitzenrath for your support
No new entity has been added to me. Just the old camera.leo 😕
I have now tested everything possible. Cleared the cache and downloaded the HACS extension again. It just doesn't show a picture anymore :( Any tips on what I'm doing wrong?
Deleted the Integration and the picture. Restart ha and Install again.
Deleted the Integration and the picture. Restart ha and Install again.
Thanks. That solve the problem.
I did the latest core update this morning and since then no chart has been shown to me.