Simple text input field to send via mqtt

Is there a way to have a simple text input field in HA to send variables via mqtt?

I try a simplified way to do this https://community.home-assistant.io/t/schedule-variant-day-hours/2968