Describe the issue you are encountering. What happened?
Documentation of FeatureFactory's WithLocation() and WithLocation2() has the following remark: "You should only adjust this if the location on the owning device is insufficient for this feature. This will be a location IN ADDITION to the device location.". This suggests that a feature's Location and Location2 will be inherited from the device. Instead the features Room (Location) gets the plugin's Id and the Floor (Location2) is set to "Plugin".
Expected Behavior
What did you expect to happen?
I expect the feature's Location and Location2 to be inherited from its device. Or, as a second possibility, for them to be null unless set.
Steps to Reproduce
Provide steps so the HomeSeer team can reproduce the reported problem:
DeviceFactory deviceFactory = DeviceFactory.CreateDevice(Id);
deviceFactory.WithName("Device name");
deviceFactory.WithLocation("Location");
deviceFactory.WithLocation2("Location2");
NewDeviceData newDeviceData = deviceFactory.PrepareForHs();
int deviceRefId = HomeSeerSystem.CreateDevice(newDeviceData);
if (deviceRefId > 0)
{
FeatureFactory featureFactory = FeatureFactory.CreateFeature(Id);
featureFactory.OnDevice(deviceRefId);
featureFactory.WithName("Feature name");
NewFeatureData newFeatureData = featureFactory.PrepareForHs();
int featureRef = HomeSeerSystem.CreateFeatureForDevice(newFeatureData);
}
Screenshots
If applicable, add screenshots to help explain your problem.
The device gets created as expected:
Logs
If applicable, include log output from the plugin console and/or the HomeSeer logs. If the logs take up more than a few lines, consider attaching a file.
N/A
Environment
HomeSeer
OS
Windows
HS Version
4.2.14.0
Development
PSDK Version
1.4.2
Language
C#
IDE
VS2022
Dev OS
Windows
Plugin
What plugin is this issue for? Any
Problem
Description
Describe the issue you are encountering. What happened? Documentation of FeatureFactory's WithLocation() and WithLocation2() has the following remark: "You should only adjust this if the location on the owning device is insufficient for this feature. This will be a location IN ADDITION to the device location.". This suggests that a feature's Location and Location2 will be inherited from the device. Instead the features Room (Location) gets the plugin's Id and the Floor (Location2) is set to "Plugin".
Expected Behavior
What did you expect to happen? I expect the feature's Location and Location2 to be inherited from its device. Or, as a second possibility, for them to be null unless set.
Steps to Reproduce
Screenshots
If applicable, add screenshots to help explain your problem.![afbeelding](https://user-images.githubusercontent.com/99019707/184683606-0f0e3721-ef43-4c35-a06a-01ff3e1804f8.png)
The device gets created as expected:
Logs
If applicable, include log output from the plugin console and/or the HomeSeer logs. If the logs take up more than a few lines, consider attaching a file. N/A