Skip to content
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

fix warnings #1867

Merged
merged 2 commits into from Nov 8, 2021
Merged

fix warnings #1867

merged 2 commits into from Nov 8, 2021

Conversation

nick2525
Copy link
Contributor

@nick2525 nick2525 commented Nov 3, 2021

Summary

Just fix some warnings

Screenshots

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

@homeassistant
Copy link
Contributor

Hi @TESTPERSONAL,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

mapOf()
)
}
if (event != null && event.sensor.type == Sensor.TYPE_LIGHT) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this is even better?

Suggested change
if (event != null && event.sensor.type == Sensor.TYPE_LIGHT) {
if (event?.sensor.type == Sensor.TYPE_LIGHT) {

mapOf()
)
}
if (event != null && event.sensor.type == Sensor.TYPE_PROXIMITY) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (event != null && event.sensor.type == Sensor.TYPE_PROXIMITY) {
if (event?.sensor.type == Sensor.TYPE_PROXIMITY) {

if (lastUpdateSensor != null) {
if (lastUpdateSensor.enabled)
LastUpdateManager().sendLastUpdate(appContext, TAG)
if (lastUpdateSensor != null && lastUpdateSensor.enabled) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (lastUpdateSensor != null && lastUpdateSensor.enabled) {
if (lastUpdateSensor?.enabled == true) {

mapOf()
)
}
if (event != null && event.sensor.type == Sensor.TYPE_STEP_COUNTER) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (event != null && event.sensor.type == Sensor.TYPE_STEP_COUNTER) {
if (event?.sensor.type == Sensor.TYPE_STEP_COUNTER) {

@homeassistant
Copy link
Contributor

Hi @TESTPERSONAL,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@JBassett
Copy link
Collaborator

JBassett commented Nov 8, 2021

@nick2525 we really need to figure out your commit email issues.

@JBassett JBassett merged commit 1c74866 into home-assistant:master Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants