Florplan: image .svg change based on time of day and resolution

Hello,
I am not able to change the .svg file depending on the time of the day in combination with the resolution of the scree.
I can modify the uploaded .svg file according to the resolution following the indications reported in the official documentation (min_width). I am able to edit the .svg file based on the “TimeOfDay” sensor status.
But I can’t do both at the same time.

Here is the code I use to modify the .svg file based on the time of day:

- element: main-background
  entity: sensor.timeofday
  tap_action: false
  hover_action: false
  state_action:
    - action: call-service
      service: floorplan.image_set
      service_data: |
          >
          switch (entity.state) {
            case "day":
              switch (min_width) {
                case
              return "/local/floorplan-casa/floorplan_optimisedday.svg";
            case "evening":
              return "/local/floorplan-casa/floorplan_optimisedevening.svg";
            default:
              return "/local/floorplan-casas/floorplan_optimisednight.svg";
          }

Use generic image camera integration for your SVG file (it’s a ‘video’) and change the file periodically. Tadaaaa!