Add huawei_lte notify component#19544
Conversation
|
Changing to Allowed me to test it as custom component. |
|
Anything I can do to get this moving forward? I don't think there's anything to be done for send failures besides logging them here, if they're not about some syntax errors caused by the implementation (which I think they aren't, but can't obviously tell for sure without seeing the error messages). |
|
I tested it some times more and I receive the notification. It looks to me
that it is working correctly. The errors in my opinion are related to what
it is behind because also the sensors from the huawei_lte module gives some
error sometimes.
The way this module operates looks correct to me. I don't know if it can be
reinforced with something like... Error then try again once.
Il mer 16 gen 2019, 21:34 Ville Skyttä <notifications@github.com> ha
scritto:
… Anything I can do to get this moving forward? I don't think there's
anything to be done for send failures besides logging them here, if they're
not about some syntax errors caused by the implementation (which I think
they aren't, but can't obviously tell for sure without seeing the error
messages).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#19544 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFtLWlCc53I7G-HuM3Pl34vrLyaPlEszks5vD4zIgaJpZM4Zf4jL>
.
|
MartinHjelmare
left a comment
There was a problem hiding this comment.
Looks good! Just a small comment.
|
|
||
| PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ | ||
| vol.Optional(CONF_URL): cv.url, | ||
| vol.Required(ATTR_TARGET): vol.All(cv.ensure_list, [cv.string]), |
There was a problem hiding this comment.
We should use CONF_ constants for config keys
There was a problem hiding this comment.
Changed to CONF_RECIPIENT as that seems to be used for this purpose in other notify component configs. But note that the similar netgear_lte and tplink_lte components use ATTR_TARGET, that's where I initially picked it up from. Maybe it should somehow be fixed in them too.
There was a problem hiding this comment.
It would be good to fix that, yes.
There was a problem hiding this comment.
It's target in the notify service itself so I'm not sure why we would use recipient in the platforms?
There was a problem hiding this comment.
For consistency within platforms? I have no strong opinions either way, but the majority of platforms already use recipient (clickatell, clicksend, clicksend_tts, mailgun, sendgrid, smtp, xmpp, yessssms, and now huawei_lte).
There was a problem hiding this comment.
I'm aiming for consistency, period. Switching nine platforms over now might seem like a lot of work, but better to do it before it's twentynine ...
I also have no particular preference for either word but for usability alone, I think it should be the same everywhere.
There was a problem hiding this comment.
Target is easier to spell. 😄
There was a problem hiding this comment.
Recipient is more descriptive :)
Description:
Add notify component using Huawei LTE router SMS.
Related issue (if applicable): https://community.home-assistant.io/t/adding-notification-to-huawei-lte-router/70950
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#7934
Example entry for
configuration.yaml(if applicable):Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.If the code does not interact with devices: