How to delete custom images/icons via python?

Python and python framework

Moderator: leecollings

Post Reply
domja
Posts: 8
Joined: Friday 20 June 2025 19:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Contact:

How to delete custom images/icons via python?

Post by domja »

Hi,

At onStop, I am trying to delete the custom images I added at startup of the plugin.

According to the Wiki :

Code: Select all

Images['myPlugin'].Delete()

However when I try the following:

Code: Select all

for image in Images:
	Images[image].Delete()
I get the following error:

Code: Select all

 Error: Image deletion failed, Image object is not associated with a plugin.
I could not find anything on the forum and also checked a lot of plugins for examples, without succes.

Any clue about what I am doing wrong?

Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest