Skip to content

Conversation

@Bizarrus
Copy link

Fix Issue #6

@Bizarrus
Copy link
Author

Adding some JSON objects for HmipSystemResponse.

@Bizarrus Bizarrus changed the title Adding SMOKE_DETECTOR Adding SMOKE_DETECTOR & missing JSON type definitions Jan 27, 2026
@Bizarrus
Copy link
Author

Adding some missing DeviceTypes:

  • ACCESS_POINT (Original device: HmIP-HCU1)
  • SHUTTER_CONTACT (Original device: HmIP-SWDO-2)
  • DOOR_LOCK_DRIVE (Original device: HmIP-DLD-S)

@Bizarrus Bizarrus changed the title Adding SMOKE_DETECTOR & missing JSON type definitions Adding SMOKE_DETECTOR, ACCESS_POINT, SHUTTER_CONTACT, DOOR_LOCK_DRIVE & missing JSON type definitions Jan 27, 2026
SMOKE_ALARM(Set.of(Feature.SMOKE_ALARM), Set.of(Feature.MAINTENANCE)),

@TypeValueDocumentation(description = "Type for smoke detecting devices.")
SMOKE_DETECTOR(Set.of(Feature.SMOKE_ALARM), Set.of(Feature.MAINTENANCE)),
Copy link
Author

@Bizarrus Bizarrus Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can support Java 8 fully, if you replace single Set.of's with Collections.singleton and lists with new HashSet<>(Arrays.asList(<entries>)):

Before

@TypeValueDocumentation(description = "Type for door locks.")
DOOR_LOCK_DRIVE(Set.of(Feature.SWITCH_STATE),Set.of(Feature.MAINTENANCE, Feature.CONTACT_SENSOR_STATE)),

After

@TypeValueDocumentation(description = "Type for door locks.")
DOOR_LOCK_DRIVE(Collections.singleton(Feature.SWITCH_STATE), new HashSet<>(Arrays.asList(Feature.MAINTENANCE, Feature.CONTACT_SENSOR_STATE))),

I don't understand why minimum compatibility with Java 11 is required just because of this class. Without Set.of, everything would be completely backward compatible and other use cases would be covered.

Take a look at my java-8 branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant