Need help setting custom component sgnea entity picture

I created this custom component for singapore weather forecast.

https://github.com/tyjtyj/sgnea/blob/master/custom-component/sensor/sgnea.py

I have this property

@property
def entity_picture(self):
    """Return the entity picture to use in the frontend, if any."""

return ‘https://www.nea.gov.sg/Html/Nea/images/common/weather/50px/’ + self._rawstate + ‘.png’

How to change the code the download the picture and serve from hass instead of link to the origin

2 Likes

tyjtyj,

Thanks for the great custom component. I used your singapore weather forecast but it is not able loading after HA 0.92 upgrade. Will you be updating this component?

I will patch it this weekend… Still oversea

Thanks tyjityi.

Patched and rename to

Please note breaking change
platform name from sgneaweb to sgnea

Tested working on 0.94.3. I have not moved to lasted HA version.

1 Like

Thanks for the update. Updated and got it working.

Hey bro. Just wanna know if you’re residing in SG and how you remote access thru port forwarding? I’m about 8-10 months into Hassio, been using the Nabucasa for about 3 months, but would wanna try the port forwarding method. Or you don’t use remote access?

Welcome to home assistant.

You need to make sure your password is very COMPLEX

Then try install add on duckdns with letscrypt

After than enable port forwarding on your router.

How do you port forward on Singapore IP address? Are you doing port forwarding or nabucasa?

Not using nabu casa.
U need to check duckdns and port forwarding on your router.
Every router has different way to do port forwarding

This is unrelated to the components. I suggest you open new topic to get better help.