Time above and below trigger issue

Please share your automation YAML correctly formatted for the forum.