diff --git a/README.md b/README.md index 0581ae0..8e9ce9d 100644 --- a/README.md +++ b/README.md @@ -198,8 +198,8 @@ In this section you can configure the content of the notification messages. * `{z}` (only for height change events) - The current z value. * `{percent}` (only useful for height change notifications) - The current percentage of the print progress. * `{time_done}`, `{time_left}`, `{time_finish}` (only useful for height change events) - Time done / left in the print and ETA. - * `{bed_temp}`, `{e1_temp}`, `{e2_temp}` - Temperatures of bed, extruder 1 and extruder 2. - * `{bed_target}`, `{e1_target}`, `{e2_target}` - Target temperatures of bed, extruder 1 and extruder 2. + * `{bed_temp}`, `{e1_temp}`, `{e2_temp}`, `{chamber_temp}` - Temperatures of bed, extruder 1, extruder 2 and chamber. + * `{bed_target}`, `{e1_target}`, `{e2_target}`, `{chamber_target}` - Target temperatures of bed, extruder 1, extruder 2 and chamber. * You are also able to access the current printer state data. See [here](./dev_utils/datastructures/octoprint/_printer.get_current_data.py) for datastructure of this data. The base variable is `{status}`. ``` Example: {status[progress][filepos]} - will insert the actual position in the printed file. diff --git a/octoprint_telegram/telegramNotifications.py b/octoprint_telegram/telegramNotifications.py index 8589361..cdf5bb2 100644 --- a/octoprint_telegram/telegramNotifications.py +++ b/octoprint_telegram/telegramNotifications.py @@ -186,6 +186,8 @@ def _sendNotification(self, payload, **kwargs): e1_target = temps['tool0']['target'] if 'tool0' in temps else 0.0 e2_temp = temps['tool1']['actual'] if 'tool1' in temps else 0.0 e2_target = temps['tool1']['target'] if 'tool1' in temps else 0.0 + chamber_temp = temps['chamber']['actual'] if 'chamber' in temps else 0.0 + chamber_target = temps['chamber']['target'] if 'chamber' in temps else 0.0 percent = int(status['progress']['completion'] or 0) time_done = octoprint.util.get_formatted_timedelta(datetime.timedelta(seconds=(status['progress']['printTime'] or 0))) time_left = octoprint.util.get_formatted_timedelta(datetime.timedelta(seconds=(status['progress']['printTimeLeft'] or 0)))