HMService
A controllable feature of an accessory, like a light attached to a garage door opener.
Declaration
class HMServiceOverview
An HMService instance represents a service provided by an accessory. Accessories have both user-controllable services, like a light, and services that are for the use of the accessory itself, like a firmware update service.
You don’t create services directly. Instead you find them in the services array of an HMAccessory instance.
A single accessory may have more than one user-controllable service. For example, most garage door openers have a service for opening and closing the door, and another service for the light on the garage door opener. These services are what Apple’s Home app labels as “accessories”.
You inspect or change a service’s HMCharacteristic instances to discover state, or modify behavior.