Casting & Pointers General

Afternoon from the UK, I know this has probably been asked millions of times but I cannot wrap my head around something. I have working code but I just dont like it, it doesnt look 'propper' (either is that grammar).

So a bit backwards but here is my working code:

      if (subscription == &lightcontrol)
        {
          Serial.print(F("Got: "));
          String valueReceivedS =  String((char *)lightcontrol.lastread);
          int valueReceived = valueReceivedS.toInt();
          Serial.println(valueReceived);
          switch (valueReceived)
            {
              case 1 //Calm
                break;
              case 2 //Bright
                break;
              case 3 //Disco
                break;
              case 4 //Off
                break;
              case 5 //Disco
            }
      }

lightcontrol.lastread Is an object which having a snoop within the class reveal that it retuns a uInt8_t variable. A byte right?

I convert it to a string of which i then convert it to a integer on the line below.

Now I thought the following would be 'nicer' and work: (im not too fussed about it becoming an int but not a string!)

char valueReceived = char((char *)lightcontrol.lastread); 


or this?

char valueReceived = (char *) lightcontrol.lastread; 

or this?

char valueReceived = char((char *) lightcontrol.lastread); 

or this?

byte valueReceived = byte((char *) lightcontrol.lastread);

And could someone explain the use of asterix? I get its a pointer, but why?

another question, why cant i use (string) casting why do i have to encapsulate?

How would you guys about this? I have a solution im just not fond of it.

Please post your complete program rather than unconnected snippets

trevorboultwood:
lightcontrol.lastread Is an object which having a snoop within the class reveal that it retuns a uInt8_t variable. A byte right?

I convert it to a string of which i then convert it to a integer on the line below.

if lightcontrol.lastread is a uint8_t, this is already a number (a uint8_t is an unsigned integer fitted on a single byte (8 bits, hence the 8 in uint8_t) - so a value between 0 and 255...)

Why would you ever want to convert it to a string to go back to number? You can just go with

 switch (lightcontrol.lastread) {
  case 1: //Calm
  break;
  case 2 //Bright
  break;
  case 3 //Disco
  break;
  case 4 //Off
  break;
  case 5: //Disco
  break;
}