Update device value
fix condition switch