Controlling Virtual Binary Sensor from Automation

I am looking for the working example how to control virtual binary sensor from Automation.
I did a lot of search but unfortunately did not find any solution for my problem.
Binary Sensor is successfully created by adding this code to the configuration.yaml
Class must be 'presence" because only this way sensor status could be passed to
the Hubitat hub.

binary_sensor:
  - platform: virtual
    name: 'Presence Status VK'
    initial_value: 'on'
    class: presence
    initial_availability: true

I can change status from the Developer Tools screen by typing on or off
in the state field:

image

But even this way after few seconds status returns to whatever I assign
to the initial_value field. Why this is happening?

However no matter what I am/was trying status does not change from Automation.
Here is what I tried for the Test Automation:

- id: '1652549626534'
  alias: BT Beacon Unlock
  description: ''
  trigger:
  - platform: device
    device_id: 15b5e6697b305fe24740ab030e5e9f97
    domain: lock
    entity_id: lock.front_door
    type: unlocked
  condition: []
  action:
  - condition: state
    entity_id: binary_sensor.virtual_presence_status_vk
    state: virtual.turn_off
  mode: single
- id: '1652550230919'
  alias: BT Beacon Lock
  description: ''
  trigger:
  - platform: device
    device_id: 15b5e6697b305fe24740ab030e5e9f97
    domain: lock
    entity_id: lock.front_door
    type: locked
  condition: []
  action:
  - condition: state
    entity_id: binary_sensor.virtual_presence_status_vk
    state: virtual.turn_on
  mode: single

What I am missing?

Please help me to solve this problem.

Not quite sure what you are talking obout, other than it’s not related to blueprints. I think this is a question for elsewhere. Maybe Configuration - Home Assistant Community
That being said, all input_boolean helpers (toggles) are virtual, just use that.

Open your Home Assistant instance and show your helper entities.

More pointers, this is all wrong,

  action:
  - condition: state
    entity_id: binary_sensor.virtual_presence_status_vk
    state: virtual.turn_off

Condition doesn’t fit there and that is not the state of a binary sensor.
They are only on or off / true or false.

Using a toggle and having the Automation UI editor help you is the way to go. Look at the YAML it makes and you will get the idea.