I may try this in a bit, I think the issue is here but it is not clear what else this may break. The current code in pyvizio is:
class InputItem(Item):
"""Input device."""
def __init__(self, json_item: Dict[str, Any], is_extended_metadata: bool) -> None:
"""Initialize input device."""
super(InputItem, self).__init__(json_item)
self.meta_name = None
self.meta_data = None
meta = dict_get_case_insensitive(json_item, ResponseKey.VALUE)
if meta:
if is_extended_metadata:
self.meta_name = dict_get_case_insensitive(meta, ResponseKey.NAME)
self.meta_data = dict_get_case_insensitive(meta, ResponseKey.METADATA)
else:
self.meta_name = meta
if not self.meta_name:
self.meta_name = self.c_name
This I am pretty sure is one of the issues:
self.meta_name = dict_get_case_insensitive(meta, ResponseKey.NAME)
That should likely be:
self.meta_name = dict_get_case_insensitive(meta, ResponseKey.CNAME)
Then, instead of using NAME as “HDMI-1”, it wwould be CNAME which is “hdmi1”
UPDATE: That is not the solution. Have to dig deeper.
By the way, given the new Vizio link to the apps, I have enhanced my Vizio integration like this:
The lower part is available whenever you are in Smartcast and can scroll through all 150+ apps by logos and lauch the app.
UPDATE
Someone asked my privately for the sensor behind buttons in the remote. Here is is:
- platform: command_line
scan_interval: 36000
unique_id: sensor.vizio_apps
name: Vizio Apps
command: "curl -s 'http://scfs.vizio.com/appservice/vizio_apps_prod.json' | jq '{\"apps\": [ .[] | {id: .\"id\", name: .\"name\", icon: .\"mobileAppInfo\".\"app_icon_image_url\", sort: .\"mobileAppInfo\".\"featured_sort\" } ]}' "
value_template: "OK"
json_attributes:
- apps
This returns a single sensor that contains every single logo and command for every app on a Vizio TV with Smartcast.