Announcement

Collapse
No announcement yet.

One Liner - Hunter Green

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    One Liner - Hunter Green

    Hunter Green,
    I would like to add special text to device status instead of just On, Off or Dim. Ie. Dim, what percent or if garage status is "on", I would like for it to say, "OPEN". I'm sure this is an easy one.

    #2
    To change "On" to "Open", just change where it says "On" to say "Open" instead. You can put anything you like into the string.

    Adding the dim percentage isn't quite as easy. It could be fit into a one-liner, but that's really stretching the limits of one-liners. Here's the version with the dim percentage:

    &hs.SetDeviceString "L13", hs.StringItem(";<img src='icons/devices/christmaslights-on.gif' align=absmiddle> On;<img src='icons/ devices/christmaslights-off.gif' align=absmiddle> Off;<img src='icons/devices/christmaslights-dim.gif' align=absmiddle>Dim" & hs.DeviceValue("L13") & "%;;;;;;;;;;;;;Unknown",hs.DeviceStatus("L13"),";")

    Getting a little too complex even for me, there.

    Better would be to use something like UltraJones's status change callback script approach.

    Nucleus Home Automation
    News, support, and updates for Rover, Network Monitor, TimeIcons, and more

    Comment


      #3
      Thanks, Hunter Green

      Now, one more question! What about "Last Change"? Or, more precisely, I'm trying to add that information to my "QuickView.asp" . Can you help?

      Comment


        #4
        Where are you having troubles with adding that information to it?

        Nucleus Home Automation
        News, support, and updates for Rover, Network Monitor, TimeIcons, and more

        Comment


          #5
          Quickview is borrowed from Rupp.

          I think what I am looking for is hs.LastChange ? Does that sound right? If so, can I place this in the one liner, too?

          Comment


            #6
            I think you'd be better to revise the ASP to display the last change time, perhaps in a separate column, rather than trying to shove that, too, into the device string.

            Nucleus Home Automation
            News, support, and updates for Rover, Network Monitor, TimeIcons, and more

            Comment


              #7
              Well, Okay. Can somebody give me an example for the .asp script?

              Comment

              Working...
              X