Announcement

Collapse
No announcement yet.

Is it possible to get Root device ref for Feature (child) device?

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

    Is it possible to get Root device ref for Feature (child) device?

    Is it possible to get Root device ref for Feature (child) device?

    #2
    I believe it is in the AssociatedDevices

    Comment


      #3
      Originally posted by dcorsus View Post
      I believe it is in the AssociatedDevices
      Yeah, for Feature AssociatedDevices has only one ref for the parent device. But feels somehow dodgy.

      Code:
      if (hsDevice is HsFeature)
      {
          // Find Root ref
          HashSet<int> asds = hsDevice.AssociatedDevices;
          Debug.Assert(asds?.Count == 1);
          if (asds?.Count == 1)
              rootRef = asds.First();
      }

      Comment


        #4
        Originally posted by alexbk66 View Post

        .But feels somehow dodgy.
        Not sure what you mean ....

        I have a trouble ticket open ... forever .... in that you cannot remove associations, only add. Problem for me when I try to migrate my PIs configuration from HS3 format to HS4 format

        Comment


          #5
          Originally posted by dcorsus View Post

          Not sure what you mean ....

          I have a trouble ticket open ... forever .... in that you cannot remove associations, only add. Problem for me when I try to migrate my PIs configuration from HS3 format to HS4 format
          But you can do hs.UpdatePropertyByRef(RefId, EProperty.AssociatedDevices, value) - or it doesn't work?

          Comment


            #6
            https://github.com/HomeSeer/Plugin-SDK/issues/82

            Reported March 8

            Comment


              #7
              March? That's great service... JLDubz ?

              Comment

              Working...
              X