HTTP Post Overrides Friendly Name

So just like the title says, when I try to make an HTTP Post to change the state of a switch from off to on or vice versa, the HTTP updates the state of the switch but overrides the friendly name to the name of the switch & generic icon. So for example, it will change switch.media_player from “Pandora” to “media player” on the frontend. I am posting with the set friendly_name in the json content, but nothing works. Any ideas?

Can you post your full request?

I am using Tasker HTTP Post to update the state of a switch.speaker_1 to “On” from “Off”, below is the json that I am posting:

{
 "state": "on"",
 "friendly_name": "Speaker",
 "icon": "mdi:speaker"
}

Once I perform the HTTP Post, the switch name on the frontend changes from “Speaker” to “speaker 1”, and only a restart will rename it to “Speaker” again.