Originally posted by: <email address deleted>
Hi people
I have a problem and tested with this code:
sub Test{
{fhem "set swLangAfwezig xx";}
Log 1, "$value{swLangAfwezig}";
}
Strange enough the first time I get in the log the message that
swLangAfwezig is set to xx and on the next line the message for the value
is still the old value. When I run Test() again I get the correct value. So
there is a delay which I don't understand. Can anybody tell me what is
happening?
Thanks.
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Originally posted by: <email address deleted>
Hi,
I would do it this way:
sub Test{
fhem("set swLangAfwezig xx");
Log 1, "$value{swLangAfwezig}";
}
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Originally posted by: <email address deleted>
Thanks
Looks better but gives the same result:
2012.08.19 13:06:26 2: dummy set swLangAfwezig aa
2012.08.19 13:06:26 1: zz
{HT}
2012/8/19 steaky :
> Hi,
>
> I would do it this way:
>
> sub Test{
> fhem("set swLangAfwezig xx");
> Log 1, "$value{swLangAfwezig}";
> }
>
> --
> To unsubscribe from this group, send email to
> fhem-users+unsubscribe@googlegroups.com
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Originally posted by: <email address deleted>
Ah, my bad:
$value is deprecated, you're supposed to use Value(), so it should read:
sub Test{
fhem("set swLangAfwezig xx");
Log 1, Value("swLangAfwezig");
}
Am Sonntag, 19. August 2012 13:08:51 UTC+2 schrieb dudler:
>
> Thanks
>
> Looks better but gives the same result:
>
> 2012.08.19 13:06:26 2: dummy set swLangAfwezig aa
> 2012.08.19 13:06:26 1: zz
>
> {HT}
>
> 2012/8/19 steaky >:
> > Hi,
> >
> > I would do it this way:
> >
> > sub Test{
> > fhem("set swLangAfwezig xx");
> > Log 1, "$value{swLangAfwezig}";
> > }
> >
> > --
> > To unsubscribe from this group, send email to
> > fhem-users+...@googlegroups.com
>
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
Originally posted by: <email address deleted>
Hey that worked. Thanks
{HT}
2012/8/19 steaky :
> Ah, my bad:
>
> $value is deprecated, you're supposed to use Value(), so it should read:
>
> sub Test{
> fhem("set swLangAfwezig xx");
> Log 1, Value("swLangAfwezig");
> }
>
>
> Am Sonntag, 19. August 2012 13:08:51 UTC+2 schrieb dudler:
>>
>> Thanks
>>
>> Looks better but gives the same result:
>>
>> 2012.08.19 13:06:26 2: dummy set swLangAfwezig aa
>> 2012.08.19 13:06:26 1: zz
>>
>> {HT}
>>
>> 2012/8/19 steaky :
>> > Hi,
>> >
>> > I would do it this way:
>> >
>> > sub Test{
>> > fhem("set swLangAfwezig xx");
>> > Log 1, "$value{swLangAfwezig}";
>> > }
>> >
>> > --
>> > To unsubscribe from this group, send email to
>> > fhem-users+...@googlegroups.com
>
> --
> To unsubscribe from this group, send email to
> fhem-users+unsubscribe@googlegroups.com
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com
> I have a problem and tested with this code:
...
> Log 1, "$value{swLangAfwezig}";
$value{swLangAfwezig} ist deprecated (I wrote this numerous times already), you
should use Value("swLangAfwezig") instead. I'd like to remove $value in the
next version (i.e. after 5.3) completely.
$value is filled with the STATE of all devices _before_ evaluating a perl
expression (notify/at/etc), this is why you don't notice any changes _inside_
the script.
--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com