what I am thinking the issue is that can_rpm is an attribute I added via the GUI, meaning that in the truck asset, can_rpm doesn’t exist by default. Is that why the colour remains the same?
I have also added the map styling via a JSON generated by chatgpt which gaves rivers and landfills the colours. So is the issue?
Here is my truckasset for introspection :
package org.openremote.model.custom;
import jakarta.persistence.Entity;
import org.openremote.model.asset.AssetDescriptor;
/**
* TruckAsset is an extension of the CarAsset class for fleet management.
* It inherits all attributes from CarAsset and is used specifically for truck vehicles.
*/
@Entity
public class TruckAsset extends CarAsset {
public static final AssetDescriptor<TruckAsset> DESCRIPTOR = new AssetDescriptor<>("truck", null, TruckAsset.class);
protected TruckAsset() {
}
public TruckAsset(String name) {
super(name);
}
public AssetDescriptor<TruckAsset> getAssetDescriptor() {
return DESCRIPTOR;
}
}
Do I need to add the attribute in this file for it to work?
Hey @Saarthi, the marker “range” config will only apply when the attribute is present, has the correct type “number/integer/…” and the value matches any of the configured values.
So by default if the attribute doesn’t contain a value within any of the specified ranges it should show the label you specified with the default asset color.
Once you specify a value within any of the ranges you should see the color change.