Skip to content

Commit

Permalink
Add support for TMC2240 temperature sensors (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
reemo3dp authored Mar 22, 2024
1 parent ac4a681 commit fe62351
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/moonraker/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ async def async_setup_optional_sensors(coordinator, entry, async_add_entities):
temperature_keys = [
"temperature_sensor",
"temperature_fan",
"tmc2240",
"bme280",
"htu21d",
"lm75",
Expand Down
4 changes: 4 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ def get_data_fixture():
"bme280 bme280_temp": {
"temperature": 32.43,
},
"tmc2240 tmc2240_stepper_x_temp": {
"temperature": 32.43,
},
"htu21d htu21d_temp": {
"temperature": 32.43,
},
Expand Down Expand Up @@ -269,6 +272,7 @@ def get_printer_objects_list_fixture():
"temperature_fan fan_temp",
"temperature_host host_temp",
"bme280 bme280_temp",
"tmc2240 tmc2240_stepper_x_temp",
"htu21d htu21d_temp",
"lm75 lm75_temp",
"heater_fan heater_fan",
Expand Down
1 change: 1 addition & 0 deletions tests/test_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ async def test_sensor_services_update(hass, get_data):
("mainsail_extruder_power", "66"),
("mainsail_fan_speed", "51.23"),
("mainsail_fan_temp", "32.43"),
("mainsail_tmc2240_stepper_x_temp", "32.43"),
("mainsail_bme280_temp", "32.43"),
("mainsail_htu21d_temp", "32.43"),
("mainsail_lm75_temp", "32.43"),
Expand Down

0 comments on commit fe62351

Please sign in to comment.