Adding a way to set door codes - Part 2: Create helpers

< Previous                                                                                            Next >


We have a very basic script written.  Now we need to make some 'helpers' so we can put the information into the script easily.  Helpers are small thingies (another technical term) that make it easier to put data into the system.

  1. Write a 'script' to set the door code.
  2. Create 'helpers' to make it easy to select the door to use, the code slot, and to enter the door code itself.
  3. Use the 'helpers' in the script.
  4. Create a 'card' that uses the helpers and the script.  This is like the lock card, but uses the helpers to get the door, code slot and door code.

Create 'helpers' to make it easy to select the door to use, the code slot, and to enter the door code itself

If you are not already there, open up the Home Assistant - http://homeassistant.local:8123/, then go to 'Configuration' in the sidebar.

Select 'Helpers'

I have already defined some helpers, your list will be empty.  

Room Name Helper

Select "Add Helper", then 'Dropdown'.

Enter "Lock Name" as the name.  Then type in a name for your lock.  This needs to be something that makes sense to you, or anyone who might be setting codes on this lock.  I have named the rooms in my house, so I will start with "Scottish Room", then select "Add"...

Now I will add some other options for my other rooms.
Then select 'Create'
You will see your new helper in the list.  It will have an 'Entity Id' of "input_select.lock_name".

Code Slot Helper

Select "Add Helper", then 'Text'.
Enter the name - "Key Code Slot"

Then select 'Create'

You will see your new helper in the list.  It will have an 'Entity Id' of "input_text.key_code_slot".

Usercode Helper

Select "Add Helper", then 'Text'.
Enter the name - "User Code"
Then select 'Create'

You will see your new helper in the list.  It will have an 'Entity Id' of "input_text.user_code".


So now we have our helpers built.  Next we will tie the 'helpers' to the script.

< Previous                                                                                            Next >

Comments

Popular posts from this blog

Home Automation

Getting your house to ask you for help: Setting up Email Notification using GMail