Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix #22

Merged
merged 5 commits into from
Oct 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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