Added conditional for the sleep state disabling

This commit is contained in:
Gregory Ballantine 2023-05-02 21:21:10 -06:00
parent 646d0b079c
commit 1c9963db76

View File

@ -1,5 +1,7 @@
{% from "system/map.jinja" import system_settings as settings with context %} {% from "system/map.jinja" import system_settings with context %}
{% set settings = system_settings['sleep']}
{% if settings.disable %}
disable_sleep_target: disable_sleep_target:
service.masked: service.masked:
- name: 'sleep.target' - name: 'sleep.target'
@ -15,3 +17,4 @@ disable_hibernate_target:
disable_hybrid-sleep_target: disable_hybrid-sleep_target:
service.masked: service.masked:
- name: 'hybrid-sleep.target' - name: 'hybrid-sleep.target'
{% endif %}