from components import ATemperatureSensor
import numpy as np


class TempSensorSim(ATemperatureSensor):
	def name(self):
		return "FakeTemp"

	def __init__(self, *args, **kwargs):
		ATemperatureSensor.__init__(self)
		self.temp_set = 19.99
		self.k_noise = 0.01

	def set_fake_temp(self, temp):
		self.temp_set = temp

	def temperature(self):
		return self.temp_set + self.k_noise * np.random.normal(0, 1) / np.sqrt(12.0)
