Skip to content

Commit

Permalink
Merge pull request #22 from firstof9/ozw-version
Browse files Browse the repository at this point in the history
Ozw version
  • Loading branch information
FutureTense authored Oct 9, 2020
2 parents 2880dac + 4ef2fbb commit 4356ce3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
14 changes: 8 additions & 6 deletions custom_components/lock-manager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,16 @@ async def async_setup_entry(hass, config_entry):
VERSION,
ISSUE_URL,
)
generate_package = None

# grab the bool before we change it
generate_package = config_entry.data[CONF_GENERATE]
if CONF_GENERATE in config_entry.data.keys():
generate_package = config_entry.data[CONF_GENERATE]

# extract the data and manipulate it
config = {k: v for k, v in config_entry.data.items()}
config.pop(CONF_GENERATE)
config_entry.data = config
# extract the data and manipulate it
config = {k: v for k, v in config_entry.data.items()}
config.pop(CONF_GENERATE)
config_entry.data = config

config_entry.options = config_entry.data
config_entry.add_update_listener(update_listener)
Expand Down Expand Up @@ -189,7 +191,7 @@ async def _generate_package(service):
)

# if the use turned on the bool generate the files
if generate_package:
if generate_package is not None:
servicedata = {"lockname": config_entry.options[CONF_LOCK_NAME]}
await hass.services.async_call(DOMAIN, SERVICE_GENERATE_PACKAGE, servicedata)

Expand Down
2 changes: 1 addition & 1 deletion custom_components/lock-manager/const.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DOMAIN = "lock-manager"
VERSION = "0.0.22"
VERSION = "0.0.23"
ISSUE_URL = "https://github.com/FutureTense/lock-manager"

# Configuration Properties
Expand Down
9 changes: 3 additions & 6 deletions custom_components/lock-manager/lock_manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ input_number:
step: 1
unit_of_measurement: "Openings Left"

LOCKNAME_pin_TEMPLATENUM:
name: "PIN"
mode: box
min: 4
max: 8

################# input_datetime: ##############
input_datetime:
end_date_LOCKNAME_TEMPLATENUM:
Expand Down Expand Up @@ -92,6 +86,9 @@ input_text:
LOCKNAME_name_TEMPLATENUM:
name: "Name"

LOCKNAME_pin_TEMPLATENUM:
name: "PIN"

################# input_boolean: ################
input_boolean:
notify_LOCKNAME_TEMPLATENUM:
Expand Down

0 comments on commit 4356ce3

Please sign in to comment.