import type { PlatformAccessory } from 'homebridge' ; import { Service } from '../config/hap' ; import TydomController from '../controller' ; import { setupAccessoryIdentifyHandler , setupAccessoryInformationService } from '../helpers/accessory' ; import { addAccessorySwitchableService , updateAccessorySwitchableService } from './services/switchableService' ; export const setupSwitch = ( accessory , controller ) : void => { setupAccessoryInformationService ( accessory , controller ) ; setupAccessoryIdentifyHandler ( accessory , controller ) ; addAccessorySwitchableService ( accessory , controller , Service . Switch ) ; } ; export const updateSwitch = ( accessory , controller , updates ) : void => { updateAccessorySwitchableService ( accessory , controller , updates , Service . Switch ) ; } ;