From: Kevin R. K. <ke...@kr...> - 2014-08-12 23:35:59
|
Joel, Those are objects and not variables. So you should interact with them in the same way as you would any other Generic_Item. In short, try: print_log "target temp: ". $target_temp->state; print_log "mode: " . $hvacMode->state; You can also do things like add those objects to groups $group->add($target_temp), or tie events to occur when the state of those objects change $target_temp->tie_event(sub {print_log("hi");}); On Tue, Aug 12, 2014 at 4:02 PM, Joel Davidson <jr...@pr...> wrote: > I've got my nest code mostly set up, but I'm having trouble reading > the current state of the thermostat. As per the examples in Nest.pm > I've got thermostat set up correctly, as when I set debug=Nest:3 > I can see the current state of the thermostat dumped in my log file. > > I've got this in my code: > $targetTemp = new Nest_Thermo_Target($nest_thermo); #noloop > $targetTempHigh = new Nest_Thermo_Target_High($nest_thermo); #noloop > $targetTempLow = new Nest_Thermo_Target_Low($nest_thermo); #noloop > $hvacMode = new Nest_Thermo_Mode($nest_thermo); #noloop > $fanState = new Nest_Thermo_Fan($nest_thermo); #noloop > > but when I try to print the current values with > print_log "target temp: $target_temp"; > print_log "mode: $hvacMode"; > > I'm seeing: > target temp: Nest_Thermo_Target=HASH(0x49e0988) > mode : Nest_Thermo_Mode=HASH(0x49e1318) > > I'm sure this is a simple oversight on my part, but I'm stumped at > the moment. Any suggestions? Thanks. > > Joel > -- > Joel Davidson > Austin, TX > > > ------------------------------------------------------------------------------ > ________________________________________________________ > To unsubscribe from this list, go to: > https://lists.sourceforge.net/lists/listinfo/misterhouse-users > > |