private void HandleZllSwitch(Sensor sensor, PhilipsHueBridge bridge)
        {
            var id     = GetUniqueId(sensor);
            var button = new PhilipsHueButtonSensor(sensor.Id, id, sensor.Name, bridge)
            {
                Model   = sensor.ModelId,
                Type    = sensor.Type,
                Icon    = "PhilipsHueIcon PhilipsHueIcon_ZllSwitch",
                Battery = sensor.Config.Battery ?? 100
            };

            OnButtonSensorFound(button);
        }
 private void UpdateButtonSensorVariables(PhilipsHueButtonSensor buttonSensor, bool somethingHappend)
 {
     if (buttonSensor.Type.Equals("ZGPSwitch", StringComparison.OrdinalIgnoreCase))
     {
         UpdateVariable($"{Name}.{buttonSensor.Id}.Button1", somethingHappend && buttonSensor.LastButton == 34);
         UpdateVariable($"{Name}.{buttonSensor.Id}.Button2", somethingHappend && buttonSensor.LastButton == 16);
         UpdateVariable($"{Name}.{buttonSensor.Id}.Button3", somethingHappend && buttonSensor.LastButton == 17);
         UpdateVariable($"{Name}.{buttonSensor.Id}.Button4", somethingHappend && buttonSensor.LastButton == 18);
     }
     else if (buttonSensor.Type.Equals("ZLLSwitch", StringComparison.OrdinalIgnoreCase))
     {
         UpdateVariable($"{Name}.{buttonSensor.Id}.ButtonOn", somethingHappend && buttonSensor.LastButton >= 1000 && buttonSensor.LastButton < 2000);
         UpdateVariable($"{Name}.{buttonSensor.Id}.ButtonUp", somethingHappend && buttonSensor.LastButton >= 2000 && buttonSensor.LastButton < 3000);
         UpdateVariable($"{Name}.{buttonSensor.Id}.ButtonDown", somethingHappend && buttonSensor.LastButton >= 3000 && buttonSensor.LastButton < 4000);
         UpdateVariable($"{Name}.{buttonSensor.Id}.ButtonOff", somethingHappend && buttonSensor.LastButton >= 4000 && buttonSensor.LastButton < 5000);
     }
 }
 protected virtual void OnButtonSensorFound(PhilipsHueButtonSensor e)
 {
     ButtonSensorFound?.Invoke(this, e);
 }