Open boc-tothefuture opened 1 year ago
Added a bit of debug to where it has an error:
select do |point|
logger.debug("Looking at point class(#{point.class}) value(#{point})")
point.point? && point_or_property_types.all? do |tag|
(tag < OpenHAB::DSL::Items::Semantics::Point && point.point_type <= tag) ||
(tag < OpenHAB::DSL::Items::Semantics::Property && point.property_type&.<=(tag))
end
end
This is the point that makes it error out.
2022-09-05 14:21:15.982 [DEBUG] [n.jruby.sitemap.render_sitemap.Array] - Looking at point class(Java::OrgOpenhabCoreLibraryItems::DimmerItem) value(35%)
Root cause was that I had "SetPoint" instead of "Setpoint".. Should we potentially have a more friendly error?
Can you elaborate more an how exactly you caused this error? The exception looks like point.point_type
returned nil
, but we just checked if it was a point, so point_type should never return nil
. AFAICT it's possible to have a property_type of nil if it's a point, but not possible to have a point_type of nil if it's a point. In fact, if it's not a point, property_type is guaranteed to be nil, even if it has a property tag on it.
results in: