package Ġcom . n ates w artz . boost controller . notifications . listeners Ċ Ċ import Ġcom . n ates w artz . boost controller . misc . get Led Color FromName Ċ import Ġcom . n ates w artz . boost controller . notifications .* Ċ import Ġcom . n ates w artz . boost controller . services . Le go Bluetooth Device Service Ċ Ċ class ĠChange LED On Color Sensor ( private Ġval Ġle go Bluetooth Device Service : ĠLe go Bluetooth Device Service ) Ġ: ĠHub Notification Listener Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġsetup () Ġ{ ĊĠĠĠĠĠĠĠ Ġle go Bluetooth Device Service . move Hub Controller . activate Color Sensor Notifications () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġexecute ( notification : ĠHub Notification ) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( notification Ġis ĠColor Sensor Notification ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġle go Bluetooth Device Service . move Hub Controller . set LED Color ( get Led Color FromName ( notification . color . string )) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġcleanup () Ġ{ ĊĠĠĠĠĠĠĠ Ġle go Bluetooth Device Service . move Hub Controller . deactivate Color Sensor Notifications () ĊĠĠĠ Ġ} Ċ } Ċ