mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
55_InfoPanel.pm: create empty layout on define file if not already existent
git-svn-id: https://svn.fhem.de/fhem/trunk@15708 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
dd9a5fc49e
commit
5d1fc6dd39
@ -260,8 +260,15 @@ sub btIP_readLayout {
|
||||
|
||||
my ($err, @layoutfile) = FileRead($filename);
|
||||
if($err) {
|
||||
# Log 1, "InfoPanel $name: $err";
|
||||
# $hash->{fhem}{layout} = "text ERROR 50 50 \"Error on reading layout!\"";
|
||||
Log 1, "InfoPanel $name: $err";
|
||||
$hash->{fhem}{layout} = "text ERROR 50 50 \"Error on reading layout!\"";
|
||||
my ($e,@layout) = FileRead('./FHEM/template.layout');
|
||||
unless ($e){
|
||||
FileWrite($filename,@layout);
|
||||
$hash->{fhem}{layout} = "text ERROR 50 50 \"Please edit layoutfile now.\"";
|
||||
}
|
||||
} else {
|
||||
$hash->{fhem}{layout} = join("\n", @layoutfile);
|
||||
while($hash->{fhem}{layout} =~ m/\@include/ && $level < 1000) {
|
||||
|
Loading…
Reference in New Issue
Block a user