-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add samsungtv zeroconf discovery #35773
Conversation
@chemelli74 Are you brave enough to do a first test? I would expect that it's not working as custom_component, you need to checkout the complete HA code and run from there. |
Why not, I have a docker test environment that is there exactly for those situations ;-) Simone |
Not sure. Run it directly. But a |
@chemelli74 I hope you had not too much work until now. There are many outstanding point. Please wait for my next message... |
@chemelli74 as you can see there are some questions unclear, but now you could test it. |
I used files from previous commit:
Simone |
Please use the most recently pushed code. |
Updated, same result:
Simone |
Do you have an update for me ? @escoand ? |
Any chance to see this PR merged ? Simone |
It's still on my agenda, but with 3 kids and other things is also quiet busy. Family is definitely priority 1. Will work on it again when I have some minutes... |
But it's not finished yet to be merged since I have that "str" issue I posted earlier? Take your time, I have 2 kids, couldn't imagine to have 3 ;) |
@pergolafabio The difference from 0 to 1 is like a complete new life, but it's getting less and less diff with every new. In the hospital they said to us "3 is the new 2". ;-D |
Sorry, missed your comment. Simone |
@pergolafabio @chemelli74 Could you please retry with the last commit? |
ok, loaded patch 1 receive this error
also added my tizen TV, i got a popup on tv ... HA wants to access ... pressed allow ... |
@@ -612,6 +624,7 @@ async def test_autodetect_legacy(hass: HomeAssistantType, remote: Mock): | |||
result = await hass.config_entries.flow.async_init( | |||
DOMAIN, context={"source": "user"}, data=MOCK_USER_DATA | |||
) | |||
print(result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove debug print.
|
||
await self._abort_if_already_configured() | ||
|
||
self.context["title_placeholders"] = {"model": self._model} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it ok to have model be None
here?
self._name = f"Samsung {self._model}" | ||
self._id = discovery_info.get(ATTR_UPNP_UDN) | ||
self._title = self._model | ||
async def async_step_ssdp(self, user_input=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async def async_step_ssdp(self, user_input=None): | |
async def async_step_ssdp(self, discovery_info): |
self.context["title_placeholders"] = {"model": self._model} | ||
return await self.async_step_confirm() | ||
|
||
async def async_step_zeroconf(self, user_input=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async def async_step_zeroconf(self, user_input=None): | |
async def async_step_zeroconf(self, discovery_info): |
self._mac = user_input[ATTR_PROPERTIES].get("deviceid") | ||
self._manufacturer = user_input[ATTR_PROPERTIES].get("manufacturer") | ||
if not self._model: | ||
self._model = user_input[ATTR_PROPERTIES].get("model") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use dict.get
if we don't handle a None
value returned.
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Prevent closing; will be a real pity with all the work done. Simone |
HI @escoand, I know your are very busy with real life and I don't want to sound rude. Thank you again for your great work, Simone |
I'm also annoyed by the current situation. The code is quite matured but still not ready. The PR is still present in my head but I couldn't find the time and motivation to finalize it. When I have the time I will first work on this. |
This PR seems to have gone stale. Closing it. |
@escoand, do you mind if I take over and try to finalize your work ? You did 99% is a pity to lost it. Simone |
@chemelli74 Yes sure, feel free to finalize it, thanks. For me it's currently really not possible specifically because I don't have a websocket device. |
@pergolafabio I would like to get in touch with you and complete the great work from @escoand. Simone |
ok, whats your ID? |
chemelli74#2180 |
Breaking change
Proposed change
Add samsungtv zeroconf discovery
Type of change
Example entry for
configuration.yaml
:# Example configuration.yaml
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale: