Kodi Community Forum

Full Version: Custom sleep timer does not show the remaining time.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi friends! Custom sleep timer does not show the remaining time.
These strings from my custom DialogButtinMenu.xml: 
                <control type="button" id="5">
                    <label>Sleep timer (30 min.)</label>
                    <include>Objects_ShutdownMenuButton</include>
                    <onclick>AlarmClock(shutdowntimer30,RunScript("/home/vis/scripts/kodi_sleep.py"),30)</onclick>
                    <visible>System.CanPowerDown | System.CanSuspend | System.CanHibernate</visible>
                    <visible>!System.HasAlarm(shutdowntimer30)</visible>
                </control>
                <control type="button" id="15">
                    <label><label>$LOCALIZE[31428] $INFO[System.Alarmpos]</label></label>
                    <include>Objects_ShutdownMenuButton</include>
                    <onclick>CancelAlarm(shutdowntimer30)</onclick>
                    <visible>System.HasAlarm(shutdowntimer30)</visible>
                </control>
This is bug or feature?))
(2018-08-31, 10:34)BytEvil Wrote: [ -> ]Hi friends! Custom sleep timer does not show the remaining time.
These strings from my custom DialogButtinMenu.xml: 
                <control type="button" id="5">
                    <label>Sleep timer (30 min.)</label>
                    <include>Objects_ShutdownMenuButton</include>
                    <onclick>AlarmClock(shutdowntimer30,RunScript("/home/vis/scripts/kodi_sleep.py"),30)</onclick>
                    <visible>System.CanPowerDown | System.CanSuspend | System.CanHibernate</visible>
                    <visible>!System.HasAlarm(shutdowntimer30)</visible>
                </control>
                <control type="button" id="15">
                    <label><label>$LOCALIZE[31428] $INFO[System.Alarmpos]</label></label>
                    <include>Objects_ShutdownMenuButton</include>
                    <onclick>CancelAlarm(shutdowntimer30)</onclick>
                    <visible>System.HasAlarm(shutdowntimer30)</visible>
                </control>
This is bug or feature?))

Hi,

sorry to revive such an old thread, but this is the only post I could find mentioning this, so I thought I'll keep it in one place. As far as I know, the statement by the OP is correct and I too would appreciate a way to display remaining time for custom alarms, not only the system one (which is what System.Alarmpos does and its why it doesn't work in OP's case).

The use case for this is simple - I have a separate alarm for switching my TV to standby, since I use RPi and leave it on, only switching off the TV (which in turn stops playback). I have this alarm with a custom name, since I want to also keep the default one that powers off the entire system (which I might occasionally need as well).

Does anyone know if there is some way to achieve this?

Thanks to anyone for responses!