From 4f8d2ec31717305f242ed7d8dfdd76af34ab86dd Mon Sep 17 00:00:00 2001 From: William Scanlon Date: Fri, 21 Jul 2017 03:40:07 -0400 Subject: [PATCH] Added Time Remaining and Time Elapsed sensors for octoprint (#8581) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an optional extended description… --- homeassistant/components/sensor/octoprint.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/sensor/octoprint.py b/homeassistant/components/sensor/octoprint.py index 150a97288cc..035799429f5 100644 --- a/homeassistant/components/sensor/octoprint.py +++ b/homeassistant/components/sensor/octoprint.py @@ -25,6 +25,8 @@ SENSOR_TYPES = { 'Temperatures': ['printer', 'temperature', '*', TEMP_CELSIUS], 'Current State': ['printer', 'state', 'text', None], 'Job Percentage': ['job', 'progress', 'completion', '%'], + 'Time Remaining': ['job', 'progress', 'printTimeLeft', 'seconds'], + 'Time Elapsed': ['job', 'progress', 'printTime', 'seconds'], } PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({