You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a Python file called sensor_base.py containing a base class that all four sensor types will inherit from. The class should store the sensor type, the room ID, and a method called generate_reading() that returns a properly formatted JSON message containing the sensor type, room, value, unit, and a timestamp. No broker connection is needed at this stage — the class just needs to produce correctly structured output that can later be published via MQTT.
The text was updated successfully, but these errors were encountered:
Create a Python file called sensor_base.py containing a base class that all four sensor types will inherit from. The class should store the sensor type, the room ID, and a method called generate_reading() that returns a properly formatted JSON message containing the sensor type, room, value, unit, and a timestamp. No broker connection is needed at this stage — the class just needs to produce correctly structured output that can later be published via MQTT.
The text was updated successfully, but these errors were encountered: