FHEM/10_MQTT2_DEVICE.pm: second try (Forum #129932)

git-svn-id: https://svn.fhem.de/fhem/trunk@26609 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2022-10-28 12:19:47 +00:00
parent 5c2b903dd5
commit 10a3ddcd45

View File

@@ -857,7 +857,7 @@ MQTT2_DEVICE_addPos($@)
sub
zigbee2mqtt_RGB2JSON($;$)
{
my ($rgb,$trans) = shift(@_);
my ($rgb,$trans) = (@_);
$rgb =~ m/^(..)(..)(..)/;
return toJSON({'transition'=>defined($trans) ? $trans : 1,
'color'=>{r=>hex($1),g=>hex($2),b=>hex($3)}});