Closed joopert closed 3 years ago
I want to remember that some platform sent e.g. -20.5 (not the telnet platform). But this fix should work also for that case, but I wonder, is not the 'type' information then incorrect. I guess I would correct the issue @ main_volume to better show where the unexpected input is received. main_volume then also has incorrect type information. Do many other commands also have unexpected input ? Then go with the current patch.
My 5-cents
There was at least one other method which also had some typeerror. I was thinking about the type information as well, so I think your way would be cleaner. I will look into which other method(s) have to be converted to str and do a new commit. Thanks.
I had some time to put the 0.2.0 in a custom component for home assistant. This resulted in the issue for me when setting the volume. Home assistant passes this as an int while in the new code it must be passed as a str.
In the old code we converted it to a str https://github.com/joopert/nad_receiver/blob/0.1.0/nad_receiver/__init__.py#L37 and in the new code we don't https://github.com/joopert/nad_receiver/blob/master/nad_receiver/__init__.py#L46 To be backwards compatible we should convert it to str again?
@gladhorn any suggestion for this? In my custom component I just fixed it with str(value)