How to I set update interval, now that we are moving camera from yaml to UI integration starting 2022.4

So I have this on my Dashboard/Lovelace for 4+ years, using the camera card. I understand it is a bit unusual using generic camera, but fits well and works well, and is one of the examples on the website.
image

For reference, the codes are:

camera:
  # Add Satellite from NOAA
  - platform: generic
    name: US SE Satellite
    still_image_url: https://cdn.star.nesdis.noaa.gov/GOES16/ABI/CONUS/GEOCOLOR/1250x750.jpg
    limit_refetch_to_url_change: true
    scan_interval: 5000     # in seconds

= = = fast forward to today = = =
Now, starting 2022.4, looks like we are moving this camera away from yaml to UI integration.
And I checked the UI, I do not see where I can do the scan_interval thing. The closest I can see is the Frame Rate (Hz), but they are integers… So how do I do something like 0.0002 Hz ???
(BTW, what does “-3 Hz” or “0 Hz” mean to this HA?)

Or… should I use other types of cards instead of camera these days? Any recommendation??
Or… should I barge into some hidden folder to edit some hidden json / yaml somewhere?
Or maybe this is discussed somewhere on GitHub?

1 Like

I have the exact same question.

Ha! I was just telling myself - am I really the only one doing this?

Even for regular generic camera feeds on the Dashboard…
I can totally anticipate that the image refresh rate at every 2 or 3 (or even 5 seconds) is probably good enough for a always-on kiosk on the wall… especially when you have multiple cameras around the house.

Yet those intervals (0.5Hz, 0.3Hz, 0.2Hz) are not possible today.

John did you find anything relevant somewhere? If anything let’s compare notes.

Make an automation that updates the entity

I am just still using the generic config in configuration.yaml. I assume that still works.

I have no need for an update every second or even a few times a second. I just need to update that picture every few minutes as it does not change that often and I dont want to hammer the website by retrieving the image every second.

But then it will still get the source every X seconds/milliseconds based on the frame rate right?

1 hz = 1 frame per second typically. But yes, it will update live based on the hz and your automation. You can just set the HZ really high and then use the update automation. Choice is yours.

I realised just now that the URL I was using was a local URL. I actually already created an automation (every 15 minutes) to download the weather image to my local storage and then use that local stored image as a camera. This is how:

In configuration.yaml add:

downloader:
  download_dir: www/downloads

Now create an automation like this, this will download the image every 15 minutes:

alias: System - Retreive weather card every 15  minutes
description: ''
trigger:
  - platform: time_pattern
    minutes: /15
condition: []
action:
  - service: downloader.download_file
    data:
      url: >-
        https://cdn.knmi.nl/knmi/map/page/weer/actueel-weer/neerslagradar/WWWRADARTMP_loop.gif
      overwrite: true
mode: single

Then add a camera through integrations with the URL (i add the ?v=4 to ensure its not cached, but not sure if that is still needed):
http://192.168.178.27:8123/local/downloads/WWWRADARTMP_loop.gif?v=4

that is not correct I think. 2hz=1 frame every 0.5 seconds. So the higher the hz, the more frequent it would retrieve.

Ah, yes, you’d set it to a low number. 1hz should still be 1 fps though.

Petro -
Exactly what John said. If you want to refresh only, say, every hour, which is 3600 seconds, which is 0.00027778 Hz (assuming my math checks out OK), which is not possible to config after 2022.4, when we are forced to move from yaml to UI integration.

The UI integration only does integers, which is not right.
image
It would not work if you set the integer to 0 Hz or -1 Hz or -100 Hz.

Then write up a bug against the integration

If you set it to zero, it won’t update at all. Then you just make an automation. That’s assuming it allows 0.

FYI, looking at the current interface in 2022.5, it looks like it accepts floats.

EDIT: Just confirmed. It allows floats and accepts values lower than 1.

Oh really? Wow thank you for checking! I was in the middle of writing the bug report for 2022.4… looks like no need.
Am going to move to 2022.5 to test this. :slight_smile:

In my instance it does not accept floats but just integers?

And it does not accept 0 as well: User input malformed: value must be higher than 0 for dictionary value @ data['framerate']