Automation, entity_id - string manipulation

solved in this post.