Skip to content

Commit

Permalink
try bugfix img device issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zoic21 authored May 13, 2024
1 parent 771aa26 commit b23ef76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/class/z2m.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,9 @@ public function getImgFilePath() {
unlink($filename);
}
file_put_contents($filename, file_get_contents('https://www.zigbee2mqtt.io/images/devices/' . $model . '.jpg'));
if(filesize($filename) < 1){
file_put_contents($filename, file_get_contents('https://www.zigbee2mqtt.io/images/devices/' . $model . '.png'));
}
}
if (!file_exists($filename)) {
return 'plugins/z2m/plugin_info/z2m_icon.png';
Expand Down

0 comments on commit b23ef76

Please sign in to comment.