This action requires a security code, but it hasn't been set up in your device's app

Hi but where do you put
secure_devices_pin: 0
??
Can we put a pin made of one digit?

If you don’t want to use a pin, look at my suggestion above of creating a dummy switch, just for google. It’s a lot easier.

Actually I am happy for the PIN, just wish to know if I can put one or 2 digits, or there is a minimum digit requirement


     lock.12_home_door:
        expose: true
        secure_devices_pin: 0
        room: Entrance
        aliases:
          - 12 door

this gives error

The correct is the one below: basically the code is only one for all your devices, and I can confirm it works with one digit


  project_id: hassio2019-3
  api_key: !secret google_api_key
  expose_by_default: false
  secure_devices_pin: "0"
  entity_config:
     cover.garage:
        expose: true
   #     secure_devices_pin: 0
        room: Garage
        aliases:
          - Garage door
1 Like

So, this feature frustrates me because it’s easily defeated by simply yelling at the door “OK Google, Close the garage” and it triggers a close command… Also, it’s fairly annoying in the fact that there’s no way to have trusted devices or trusted voice(s)… If the command originates from my phone or my wife’s phone or if it is myself of my wife from any device in the house, it should accept the command as “Safe”…

Hey, was tired of speaking out the pin, did as per your suggestions and works great: I even have it in two languages, and works too

Thanks. Hope Google is not breaking it

How does one set a pin to begin with?

ok, I am getting this and can not get a cover to work.
There is not documentation on this pin and where it should go.

where the hell do you put it? my config keeps failing.

Notice: /Stage[main]/Profile_ha::Homeassistant/Exec[lint_home_assistant_automations]/returns:     - Invalid config for [cloud]: [secure_devices_pin] is an invalid option for [cloud]. Check: cloud->cloud->secure_devices_pin. (See /home/homeassistant/.homeassistant/configuration.yaml, line 114). Please check the docs at https://home-assistant.io/components/cloud/
Invalid config for [cloud]: [secure_devices_pin] is an invalid option for [cloud]. Check: cloud->cloud->google_actions->secure_devices_pin. (See /home/homeassistant/.homeassistant/configuration.yaml, line 114). Please check the docs at https://home-assistant.io/components/cloud/

DO i have to tell GA to use this pin everytime? How does that work.

Hi, I struggled with this pincode too, but finally figured it out…

You need to choose a pincode of digits and put it between "
so like this:
secure_devices_pin: “1234”

This works perfectly in any language.

1 Like

I am experiencing the same thing! Any solutions?

See geertmeersman’s answer above.

Can you give me more detail on your setup? I have my pin setup under

google_assistant: 
  secure_devices_pin: "XXXX"

but still doesn’t work. Assistant will ask for my pin but when I reply the pin with my phone, my phone will search XXXX and when I reply it to my google home it will say something like I am not sure how to help with that yet.

Post your whole configuration

google_assistant:
  secure_devices_pin: “1234”
  project_id: !secret google_assistant_project_id
  service_account: !include ancient-truth-196905-9593a4193846.json
  report_state: true
  expose_by_default: false
  entity_config:
    light.office_ceilinglight_1:
      name: Ceiling Light 1
      expose: true
      room: Office

“Hey google, turn on home alarm results in” results in an error message of unknown fault within google asssistant. Google doesn’t even ask me to give the secure pin.

My config look like this:

google_assistant:
  project_id: ????
  service_account: !include ????.json
  report_state: true
  secure_devices_pin: "XXXX"
  exposed_domains:
    - switch
    - light
    - Alarm_Control_Panel

  entity_config:
    alarm_control_panel.home_alarm:
      expose: true
      room: Living_room

Does anyone know how to solve this problem I ran out of options…?

If this helps,
I got around this problem by disabling the pin number required for the alarm panel and creating a script to arm and disarm the panel. Once I had the script, I created a google home routine to execute that script:-
Note: I am connected to my google assistant via Nabu Casa cloud (im not sure if that makes a difference)

configuration.yaml:
alarm_control_panel:
- platform: manual
name: Alarm
# code: 1234 # Remove the code completely
###################################

scripts.yaml
garage_alarm_on:
sequence:
- entity_id: alarm_control_panel.alarm
service: alarm_control_panel.alarm_arm_home
garage_alarm_off:
sequence:
- entity_id: alarm_control_panel.alarm
service: alarm_control_panel.alarm_disarm
##################################
`
In my google home app, I have a routine with the following:-
when I say ‘turn on the garage alarm’
run the custom command as
start garage_alarm_on
then say ‘The garage alarm is armed’

To turn it off, say ‘turn off the garage alarm’ and run the custom command ‘start garage_alarm_off’

(I have no idea why my formatting is showing incorrect, despite posting the correct format, perhaps someone can tell me how to fix this)
I hope this helps.

That could be an option but I rather not use a work around. I want to understand why the secure pin option doesn’t work and how to solve it. It should work, right?

Use the preformatted text option for the correct formatting. :wink:

1 Like

When you reply the PIN code, you need to say the pin as a whole number.
So “1234” is not “one two three four”, but one thousand two hundred and thirty four.

hope this helps.

1 Like

I’ve tried saying the hwole number as well but it still returns that it doesn’t know how to help me. I have continued conversations on as well.

I can go up to the Home Hub (w/ screen) and type in the PIN and it works, but doing it via voice either as “one one one one” or “one thousand one hundred and one” still results in it saying it doesn’t know how to help.

Any advice here would be appreciated, thanks in advance!