How do you make a Mutli subheading Text Sensor

i tried googling but didnt help
what i want is a text sensor with multi text sensors. just like the enivormental sensor

so currently i have a
sensor.warning_message

as my sensor… and what i have is an automation to check my emails for amazon delivery guy and then posts a sentence in the sensor and gets displayed on nextion screens

and how i have it is on the nextion screen it has title “warning” and the message from the warning_message sensor
but i wanna make it more universal

so what id like is

eg Amazon

sensor.warning_message
  title: Amazon
  message: Packages Have been Delivered
  title_color: Yellow
  message_color: White

eg flooding

sensor.warning_message
  title: Warning
  message: There Is Water In The Basement
  title_color: Yellow
  message_color: White

eg fire

sensor.warning_message
  title: Red Alert
  message: The House Is On Fire Get Out
  title_color: Red
  message_color: Yellow

so i have automation that sends a message to the sensor.warning_message using the pythong set state script but id also like to be able to add a title so everything i have isnt a warning… so i can change it… changing the title in the nextion screen…

but i have no idea how you do this

for my one amazon automation i set it

service: python_script.set_state
data:
  entity_id: sensor.warning_message
  state: >-
    Amazon Gifts Been Delivered                Intelcom  {{
    as_timestamp(states('sensor.date_time_iso')) | timestamp_custom('%I:%M %p')
    }}

i also find that home assistant is complaing the sensor is too long to be put in the database or something

and this is my code in esphome that sends the message to the nextion screen… but id wanna be able to add those other sub heading fields once that part works… which i dont know how to do either

              lambda: |-
                id(nextion1).goto_page("warning");
                id(nextion1).set_component_text("wmessage",id(warning_message).state.c_str());
                id(warningc) = 1;